add throttling option to campaigns API?
Per your docs, the Campaigns api sends messages at a rate of about 60000 per minute. (https://getstream.io/chat/docs/python/campaign_api/?language=python). Would it be possible to add a throttling option so that these messages get sent more slowly, at a rate specified by the user?
The reason is that we have a server that handles the webhooks for new message events. Normally that server handles at most a few hundred events per minute. If that number were to jump to 60000 / minute without any ramp-up time, the server would undoubtedly crash.
Hey @jmensch1,
Thank you for the feedback!
Would disabling webhooks for messages generated by the campaign be a viable option for you in this case?
There are skip_webhook and skip_push params to skip Webhook and Push events accordingly.
cc @vishalnarkhede
Hi @kanat, thanks for getting back to me.
I saw the skip options in the docs. Unfortunately those won't work in our case because we actually want to process the new-message webhooks for a variety of reasons.
Jake
Hi @jmensch1,
Thank you for the update! We will add this to our backlog 👍
Hi @kanat,
I didn't know about that. It's a nice solution and would probably work from a technical point of view. The only problem is that all of our infrastructure is on GCP, and I don't think there would be a lot of interest in opening an account with AWS just for this purpose.
Just so you know, when Stream shut down the first Campaigns api a few months ago, I wrote a service for sending campaigns using the regular Messaging api. It's a bit slow, since I need to stay under the rate limit, but it's working well enough. So it's not urgent for us to use the new Campaigns api right now. I might try it again at some point in the future.
Thanks Jake