Skip to content

Gamelift Flexmatch events that go to SNS topics have different Ticket Statuses than the ones described in API documentation

0

I'm trying to read the matchmaking ticket status by game client.

There's an SNS topic that receives events from Flexmatch. These events are ultimately read by the game client, which checks the status of the ticket. In the even that comes through the SNS topic, I'm using the field using python: event['Records'][0]['Sns']['Message']['detail']['type']

So essentially it's detail.type.

The problem is, that the detail.type contains values that don't use same phrases that ticket.Status uses in API documentation.

For example: SNS topic event have "Succeeeded" instead of "COMPLETED". In order to handle that, please provide a complete list of statuses that Flexmatch events send to the SNS topic.

These statuses in API documentation are:

QUEUED -- The matchmaking request has been received and is currently waiting to be processed. SEARCHING -- The matchmaking request is currently being processed. REQUIRES_ACCEPTANCE -- A match has been proposed and the players must accept the match. This status is used only with requests that use a matchmaking configuration with a player acceptance requirement. PLACING -- The FlexMatch engine has matched players and is in the process of placing a new game session for the match. COMPLETED -- Players have been matched and a game session is ready to host the players. A ticket in this state contains the necessary connection information for players. FAILED -- The matchmaking request was not completed. CANCELLED -- The matchmaking request was canceled. This may be the result of a StopMatchmaking operation or a proposed match that one or more players failed to accept. TIMED_OUT -- The matchmaking request was not successful within the duration specified in the matchmaking configuration.

Thanks!

1 Answer
2

The FlexMatch events sent to SNS topics use different naming conventions than the ticket statuses in the API documentation. Based on the available information, here's the complete list of event types that FlexMatch sends to SNS topics:

  1. MatchmakingSearching - This corresponds to when a matchmaking request is being processed
  2. PotentialMatchCreated - This is emitted when a potential match is created and may require player acceptance
  3. AcceptMatch - When players need to accept a match
  4. AcceptMatchCompleted - When the match acceptance process has completed (can have values of "Accepted", "Rejected", or "TimedOut")
  5. MatchmakingSucceeded - When matchmaking has successfully completed (corresponds to COMPLETED in API)
  6. MatchmakingTimedOut - When matchmaking request has timed out
  7. MatchmakingCancelled - When matchmaking has been canceled
  8. MatchmakingFailed - When matchmaking has failed

These event types are found in the "detail.type" field of the SNS message, as you correctly identified. The naming convention differs from the API documentation's ticket statuses, which is why you're seeing "Succeeded" instead of "COMPLETED" in the events.
Sources
FlexMatch matchmaking events - Amazon GameLift Servers
MatchmakingSucceeded - Amazon GameLift Servers
MatchmakingFailed - Amazon GameLift Servers
AcceptMatchCompleted - Amazon GameLift Servers
PotentialMatchCreated - Amazon GameLift Servers

answered a month ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.