You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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.
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.
Activity
kanat commentedon Apr 1, 2024
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_webhookandskip_pushparams to skip Webhook and Push events accordingly.cc @vishalnarkhede
jmensch1 commentedon Apr 2, 2024
Hi @kanat, thanks for getting back to me.
I saw the
skipoptions 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
kanat commentedon Apr 3, 2024
Hi @jmensch1,
Thank you for the update!
We will add this to our backlog 👍
kanat commentedon Apr 4, 2024
Hi @jmensch1,
Would SQS be an option for you in this matter?
jmensch1 commentedon Apr 4, 2024
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