SendMatchState vs RPC for client to server messages in authoritative multiplayer

I am new to Nakama and currently designing a server authoritative clash royale-like game.
Should I send played cards via match state messages (which is used by relayed multiplayer) or RPC functions?

Can we prevent match state messages to be automatically relayed to other clients? Can we restrict particular op codes to be sent by servers or clients? Or should clients send all messages(which we don’t want to be relayed) to the server through RPCs in an authoritative match?
I also want to broadcast match state messages in the match loop of the server, can we make sure clients can’t send those op codes as well? (through hacking or network spoofing for example) I want them to be completely ignored by the server instead of being relayed.

What do you think about this workflow? Is this a good approach?
The client sends played card info to the server through RPC > Server processes it in the match loop ticks > The server broadcasts match state messages(positions, health stats etc.) to both clients to keep them updated. (those messages should be restricted to server-only)


If you use the authoritative match handler feature of Nakama, the match state messages sent by each client are received in the match_loop function and won’t be automatically relayed to other clients. Unless you explicitly write the code in match_loop to relay them.

You can have the match_loop ignore the opcodes that are not allowed. You can also have the runtime match handler send match state messages that it generates by itself or just have it relay the messages it receives.