我正在使用以下请求向FCM发送显示消息:
curl -i -H 'Content-type: application/json' -H 'Authorization: ****' -XPOST https://fcm.googleapis.com/fcm/send -d '{"time_to_live":120,"priority":"high","content_available":true,"condition":"'''4pz87gsel7183b7kcadw1dwzv''' in topics OR '''4njsfszcgd9m765d6suktsz2a''' in topics OR '''match-4i5yvb5co56meztqpc1quflk9''' in topics","data":{"event_id":"4i5yvb5co56meztqpc1quflk9_20180715150017","timestamp":1531666817},"notification":{"title":"test123,"body":"u231a test123","sound":"sound","click_action":"my_action_link","android_channel_id":"ticker"}}'
但有时这条信息需要长达10分钟才能送达客户?(适用于iOS和android(。如何实现更快的交付?
我们发现了这个问题。Firebase通常会非常缓慢地传递已使用主题发布的消息。如果你将消息发送到特定的个人设备,它会很快送达。