function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Bhagyashree JogBhagyashree Jog 

Get Salesforce platform events on subscriber 100 at a time

Hello,
I am using cometd to connect to Salesforce Streaming API to subscribe to platform events channel. I have lot of messages on my event channel, but my client is not equipped to take in all the messages at once. Is there a provision in Salesforce streaming where I can get only 100 messages at a time in one /meta/connect request. I have read that Salesforce supports message batching in Streaming. How do I use batching to get messages in batches of say 100 at a time on my streaming client.
AbhishekAbhishek (Salesforce Developers) 
https://salesforce.stackexchange.com/questions/215186/how-to-publish-consume-bulkified-platform-events

This might answer your query.
Bhagyashree JogBhagyashree Jog
Hi, 
Unfolrtunaltely no, this article describes how to publish events in bulk. What I want to know is how do I subscribe to a platform event and control the number of incoming events in one /meta/connect call. For ex. I have subscribed to a platform event /event/PEvent__e which has about 2000 messages published. I want to receive only 100 messages at a time in one /meta/connect call. Is this possible in Salesforce platform events, push topic etc. Please help