With FCM, you can send two types of messages to clients:
- Notification messages, sometimes thought of as "display messages."
- Data messages, which are handled by the client app.
A notification message is the more lightweight option, with a 2KB limit and a predefined set of user-visible keys. Data messages let developers send up to 4KB of custom key-value pairs. Notification messages can contain an optional data payload, which is delivered when users tap on the notification.