In Firebase cloud function can send push notification to any user if the user device token is stored in Firebase database. Again if the user subscribes to a topic then also another user can send a notification to the user. Now the question is that in what situation we should use topic messaging and in what situation we should use cloud function to send the notification. If any user subscribes to his unique ID (as provided by Firebase) then anyone can send topic messaging to him by publishing topic messaging to that unique ID. Is it a good approach or we should use cloud function to send push notification to that user using the device token. Is it a good idea to subscribe to his own unique ID to get a notification. Please help me to resolve my issue. Is topic messaging is free to use?