question

Carlos Feldmann avatar image
Carlos Feldmann asked

How to use real time notifications with Matchmaking

Hello Folks, I need help implementing real-time notifications for when a matchmaking match is found, I was able to subscribe to the MatchMaking MatchInvite and listen for the topic in PubSub, but no messages are received.

Connection code

var handle = await _pubsub.GetConnectionHandle(true); var req = new SubscribeToMatchResourceRequest() { SubscriptionVersion = 1, Type = "MatchInvite", EntityKey = LocalPlayer(), ResourceId = "@me", PubSubConnectionHandle = handle }; PlayFabMultiplayerAPI.SubscribeToMatchmakingResource(req, result => { _invitesTopic = result.Topic; _pubsub.ListenTopic<string>(_invitesTopic, ListenForMessages); }, _playfab.HandleError);

Just for context, I already implemented the listener for LobbyChanges, and is working perfectly.

I already came across the following topics, https://community.playfab.com/questions/62028/matchmaking-how-do-i-use-the-subscribetomatchmakin.html https://community.playfab.com/questions/53078/adding-matchmaking-to-our-game-and-finding-and-joi.html

The answers say that real notifications do not work for matchmaking, then why expose the endpoint to subscribe to match invites?

apisunity3dmultiplayerMatchmaking
1 comment
10 |1200

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

Carlos Feldmann avatar image Carlos Feldmann commented ·

Also, I receive the SubscriptionChange message confirming that I'm successfully subscribed to the topic. Example of the message: {"Topic":"1~match~MatchInvite~title_player_account.F852610CCC634DF6","Status":"subscribeSuccess"}

0 Likes 0 ·

1 Answer

·
Simon Cui avatar image
Simon Cui answered

The Matchmaking and Lobby features have built in support for real-time notifications currently. The client SDK manages calls between clients and Lobby and Matchmaking services. It handles the delivery of notifications from those services to connected clients in real time. There's no support for real-time notifications without the client SDK at this time. Real-time notifications aren't available as a solution for stand-alone or general use. You may refer to Lobby and Matchmaking real-time Notifications - PlayFab | Microsoft Learn, Real-time notifications for Lobby and Matchmaking APIs - PlayFab | Microsoft Learn and Matchmaking quickstart - client SDK - PlayFab | Microsoft Learn.

10 |1200

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

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.