Using "ds claim" with amssim

Hello, I’m currently trying to get an end to end test of my dedicated server’s integration with AMS using amssim. My local server is showing up in the admin portal with what I believe to be are the appropriate claim keys and I’ve got a session template setup, but the “ds claim” command does nothing. Here’s my setup:

amssim config.json:
image

session template:

dashboard:

…so as you can see in the dashboard, the server is “claimed” but the server was not told about it as I expected to receive a message via the Hub websocket connection. (Note that I’m not using the SDKs as my dedicated server is written in typescript, but both the watchdog and hub websocket connections have been stood up correctly.)

Additionally here is the Server configuration for the session template above:

Hi @njupshot,

AMSSim will only set the DS status to claimed when you call ds claim. DS Hub is not aware of that action. DS Hub will inform the DS regarding the claim action when the Session Service requests DS in AMS. Here’s a quick flow to do that:

  1. Start DS locally using AMSSim (without calling ds claim).
  2. DS should send “ready” to AMS (I believe you’ve already done this).
  3. Game Client Create Session. Make sure you attach the ServerName with your local DS server name.
  4. Now, DS Hub will inform your DS regarding the claim event. This is an example of the websocket message:
{"payload":{"namespace":"studio-gamenamespace","session_id":"uuid"},"topic":"serverClaimed","traceContext":{"b3":"","traceparent":""}}

If you want to test it using matchmaking, you can Create Match Ticket with the "attributes": {"server_name": "your_local_server_name"} attached.

I hope this answers your question.

You’ve been much help, thank you @Damar . I’m now getting an HTTP 400 when running the following:

async function matchmakeAsync(accessToken: string): Promise<void> {
    const response = await Matchmaking.MatchTicketsApi(
        AccelbyteSDKManager.instance().getSdk(), 
        {
            config: {
                headers: {
                    Authorization: `Bearer ${accessToken}`
                }
            }
        }
    ).createMatchTicket({
        matchPool: 'game-dev-njoseph',
        attributes: {
            'server_name': 'RS-NJOSEPH-3'
        },
        latencies: {}
    });

    Logger.logInfo(LogCategoryMain, `ticket id: ${response.matchTicketID}`);
}

…any ideas?

Thanks,
Nick

Strange, I ran the same code again today and it worked (I got a matchmaking ticket id). Then I ran it again, and got an http 400. Why would subsequent requests for matchmaking ticket cause a 400?

Hi @njupshot,

A single user can only have one active match ticket, and if you try to create multiple match tickets, you will get error code: 520324. Please let me know if this answer your question.

If you have any further questions that are not related to this thread’s topic, please feel free to create another post. Thank you.