E I
E I

Reputation: 533

Firebase Cloud Messaging Service suddenly stops receiving mesages

My application receives push notifications after some event on the server.

Everything works fine, except in the case when there is a lot of events happening one-by-one inside a small interval of time.

After this, the case application suddenly stops receiving FCM remote notifications at all.

From the backend side everything is okay.

It is receiving a success response from Firebase.

The Firebase token on the device is also okay because of the app receiving the notification from the Firebase console.

Upvotes: 0

Views: 1355

Answers (2)

E I
E I

Reputation: 533

Use Notification message or Notification message with optional data payload. With section

 "notification":{
  "title":"Portugal vs. Denmark",
  "body":"great match!"
}

A flood of Data messages will be stopped, only lots of notification messages inside small interval of time can be received. It is not documented anywhere, found the solution after a huge amount of different experiments

Upvotes: 0

Venkata Narayana
Venkata Narayana

Reputation: 1697

You should probably whitelist your backend server. You can do this using Google Admin APIs by adding the IP address of the server which delivers push notifications to the GCM server. This might have been added as an added security measure to prevent abuse.

Upvotes: 2

Related Questions