I'm trying to send notifications for a messaging system between users. I'm still quite new to this so I'm not sure which method I should be using to send notifications for replies to chat groups. Currently I'm thinking of either:
Subscribe each chat participant to the chat id as a topic then push all new messages to the topic. This seems to be more efficient in resources by offloading the one-to-many nature to Google's servers. However, it seems like topic notifications don't have the ability to set the title and I'm not too sure about the security point of it.
Send the notifications to the token ids of all chat participants each chat. This seems to be very resource heavy as my app server would have to send the entire list of participants for each message.
Appreciate any advice.
Thank you.