Jump to content

Alin

Members
  • Content Count

    4
  • Joined

  • Last visited

Community Reputation

1 Neutral
  1. Thank you! So I will have to resort to the brute force approach. In the future I think I will have to handle at least 50 messages / second with peaks of 100 up to 200 messages / second (sometimes they are time-critical), which I am thinking to send using multiple threads and possibly multiple FireBase service accounts. I think I will almost need a separate machine to do all this - if the project expands. I don't know which limits are set by Google for those who send messages through this method, I may have some (unpleasant) surprises in the future. Thank you again for all your help and your libraries!
  2. Thank you very much for replying! I now understand the matter with the topics, thank you! I have studied the groups (via the link you posted) and I think I have found that: 1. they have at most 20 members (perhaps they are only targeted for groups of devices belonging to the same user / person) " The maximum number of members allowed for a notification key is 20. " 2. they are accessible only through the old (legacy) HTTP protocol, which is severely discouraged or even disabled for new projects " You can use device group messaging via the legacy XMPP or HTTP protocols on your app server. " In this case: creating a group, sending the message and then deleting the group could be only marginally more effective than the brute force approach of sending single-device messages. Did I understand this correctly? Have a nice day! Alin
  3. Thank you very much for answering! I will try to give some more details about my issue. I have around 100,000 (not paying) users in this app and I need to be able to send notifications to some of them at any moment, for example 1,500 now and 2,000 in an hour. These two (1.5k and 2k) recipient sets are completely random, they have nothing in common except for a coincindence when 4 users may be the same in both sets; they are not subscribed to anything and I must be able to pick any number of random users and send a notification to each of them. I could create groups or topics but those groups/topics would mean nothing after the notification messages are sent, as the next batch could be just as random as the previous one. Grouping them in any consistent way is impossible and any group or topic should dissolve after I sent a certain batch to that group, since the next set will not be based on any former group. And the most difficult part is that I don't get to pick those recipients - but a special kind of app users do, and they have no fixed criteria for this (they are administrators of certain things and I have to let them do their thing; the users sometimes wait for those notifications and even worse, sometimes they need them in case of some emergency; this is not an app for fun). I wish to do it like sending a newsletter for example: if I own/control the database then I can pick at any given time 2,500 random recipients and send the e-mail or the snail-mail to them if necessary, depending on criteria that can be anything. But those administrators above decide, and they don't group users into groups or topics, it's about very different criteria. How can I do the same for these FCM notifications? What is the best solution in this case, what would you recommend me to do? My fall-back-to scenario is the brute force approach, where I would create a few servers to send these messages one by one, through a few FCM service accounts. This is quite blunt and I hope there is a more refined possibility. I was hoping for some "group message" constructed in JSON, with more than one recipient in the token list. Or could I create a topic and subscribe the users to it from the server side, then send the message to that topic, and then dissolve it? Thank you, Alin
  4. First I want to .honestly. congratulate and thank Dave Nottage and all his collaborators for the great work which is the Kastri Library. I would praise it more but I don't want to annoy the other readers. And now for the question itself 🙂 I have succeded in programatically using Kastri and PushIt example parts to send a single message (a.k.a. notification) through Firebase Cloud Messaging System, to a single recipient, using a single token. I have seen that Google's SDK can multicast a message to up to 500 recipients - for example if I want to send the same message simultaneously to many users who have nothing in common, thus without relying on topics, groups and so on, which are not appropriate for my use case scenario. I want to somehow feed FCM a list of 500 tokens so it could send the message to all of them. How can this be done in Delphi? How should one implement this? Is it a different request / JSON syntax? Or is it done by simply sending 500 separate messages, each to a single recipient? And if it can only be done using a succession of single-recipient messages, how many FCMSenders can I set up to use on a single FCM service account? I need short quick bursts from time to time. The example I want to expand to multiple tokens/recipients is something like this (below is the JSON content from the memo of the PushIt example, I deleted some CRLFs): {"message":{ "token":"c1bF8qRZfB2i_9FgWtLsX4DVWvDMMb6EOHKAfNdOxt-LubU9by-akksT5uVEKzuGpKJrSrGmOOK0ypBrBc9m.....", "notification":{ "title":"Title1", "body":"Body1" }, "apns":{ "payload":{ "aps":{ "badge":0, "mutable-content":1 } } } } } I apologize if this question has already been asked, I wasn't able to find the thread. Thank you again! Alin
×