question

jbagatta avatar image
jbagatta asked

When do these PlayStream events fire?

I am working on integrating some custom logic on top of the PlayFab API. Specifically, I need to make external API calls when a game server is started and stopped. Our servers (externally hosted) will be making PlayFab API calls, specifically /Server/RegisterGame and /Server/DeregisterGame.

I found these two PlayStream events:

However, the documentation around them is somewhat confusing - the event names refer to game servers, but the descriptions specify lobbies, and I'm unclear on what "start" and "stop" mean in these contexts. If they directly correlate to the register and deregister API calls, I can forward them to my external service via webhooks.

So my question is, when exactly are these events fired? If these aren't what I need, is there support for custom events being forwarded via webhooks yet?

apiswebhooks
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

Those APIs and Events are designed for the legacy game server, they are not available right now. If you are using PlayFab Multiplayer Servers, then you can trace the event server_state_changedto know server status. A server is up if its status changes from StandingBy to Active. A server is down if its status changes from Active to Terminated.

If you are using external servers, making sure the server is able to connect should be fine.If your server needs to start only when it is in use, you can use Azure Functions to start it.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

jbagatta avatar image jbagatta commented ·

Is it possible to use the GSDK with external servers, or only on those hosted and managed in PlayFab?

0 Likes 0 ·
jbagatta avatar image jbagatta commented ·

Also, the multiplayer_server_state_changed you linked is part of the same docs in which I found the API calls and gameserverhost events - is there a way for me to tell what is supported and what is not in the docs?

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]