question

Marcel Ernst avatar image
Marcel Ernst asked

How to use SubscribeToLobbyResource and SubscribeToMatchmakingResource

Hi,

I currently try to find out, how to receive updates about lobby changes, lobby member joins and lobby invites. I think the SubscribeToLobbyResource is the correct endpoint for that, but what is the ResourceId and SubscriptionVersion parameter?

Same for matchmaking. I want to implement a ready check, once a match is found the players should accept the match or leave the matchmaking queue and the queue should continue searching for more players. The correct method should be SubscribeToMatchmakingResource to receive updates about the members of a matchmaking ticket, but what is the ResourceId parameter?

The SignalR setup is no problem, but how do I subscribe to the updates?

apisMatchmaking
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.

Gosen Gao avatar image Gosen Gao commented ·

I will do some research.

0 Likes 0 ·

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

It is recommend to use our Lobby SDK to do the real-time notifications. As our documentation mentions, “Using Lobby, Matchmaking, and real-time notifications directly with REST and SignalR APIs is significantly more complex than using client SDKs such as the Lobby C++ SDK, Unreal Engine 4 SDK and Unity SDK, and should only be done if the SDKs don't meet your needs.”

If you do need to use REST and SignalR APIs, then the ResourceId should be the Lobby id and the SubscriptionVersion should be 1.

6 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.

이언우 avatar image 이언우 commented ·

@Gosen Gao Hello. I'm trying to use this feature as well, but I cannot find any descriptions about 'PubSubConnectionHandle' field. Can you let me know how I can get this value? Thanks.

0 Likes 0 ·
Marcel Ernst avatar image Marcel Ernst 이언우 commented ·

You can find the SignalR documentation here. You receive the connection handle when connection to the SignalR Hub.

1 Like 1 ·
이언우 avatar image 이언우 Marcel Ernst commented ·

A-ha that's what I missed... Thank you for your kind answer

0 Likes 0 ·
Marcel Ernst avatar image Marcel Ernst commented ·

Hi, I need to use a custom implementation, as the SDK doesn't support MacOS and Linux.



I assume the ResourceId to receive invites is the ID of the player receiving the invites?

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao Marcel Ernst commented ·

If you want to subscribe to LobbyInvite, then the ResourceId should be "@me".

0 Likes 0 ·
Caner Kara avatar image Caner Kara Gosen Gao commented ·

Hi, what is the ResourceId for LobbyChange?

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.