stream-chat-react icon indicating copy to clipboard operation
stream-chat-react copied to clipboard

question: Channel List Component Reaches Rate Limit Due to QueryChannel for Each New Channel on Campaign Creation

Open LongJohnSilver1504 opened this issue 1 year ago • 6 comments

Hello there:

When a campaign is created with thousands of users, the Channel List component starts to perform a queryChannel for each newly created channel. This behavior causes the application to quickly reach the rate limit, particularly in the view of the user who creates the campaign.

Steps to Reproduce:

1.	Create a campaign with a large number of users (e.g., thousands).
2.	Observe the Channel List component’s behavior in the user’s view who created the campaign.
3.	Notice that a queryChannel is triggered for each new channel created, leading to rapid rate limit exhaustion.

Current Behavior: The Channel List component makes a queryChannel request for every newly created channel, which is not scalable for campaigns with a large number of users.

How I could solve this problem?

Thanks

LongJohnSilver1504 avatar Jun 28 '24 12:06 LongJohnSilver1504

Hello @LongJohnSilver1504 how do you create campaigns? Do you create them client-side or server-side?

MartinCupela avatar Jun 28 '24 12:06 MartinCupela

Hi @MartinCupela I created the campaign on the server.

Im just investigating and after the campaign creation the event

notification.message_new | Moves channel to top of list and starts watching | onMessageNew

is called for every campaign message on the sender chat view

and here is the problem

Now Im just trying to debounce or something

LongJohnSilver1504 avatar Jun 28 '24 13:06 LongJohnSilver1504

Hey @LongJohnSilver1504 , please give me some time to clarify this with the team.

MartinCupela avatar Jul 01 '24 08:07 MartinCupela

Perfect @MartinCupela I also explain the problem to Anders Lund from support ;)

LongJohnSilver1504 avatar Jul 09 '24 14:07 LongJohnSilver1504

Hello @LongJohnSilver1504 , the issue is now taken care of by our back-end team. I will keep you updated.

MartinCupela avatar Jul 15 '24 07:07 MartinCupela

I am still facing this issue and had to contact support. @MartinCupela. Currently on the clientside I can't get any reliable information to perform stateful loading when the campaign is active, web hooks are slow I need a result quicker to determine when it finishes. I've even tried utilizing the campaigns query server side but the progress data never seems to update? It stays at 0 even though on the client and dashboard the messages are sent..

brianMxBm avatar Apr 08 '25 02:04 brianMxBm