Limit the amount of messages

Apr 5, 2011 at 7:23 PM

Is there a way or is it planned to pass a parameter to return a maximum amount of messages?...suppouse i want all the messages from chanel 1, from message 100, but only the top 10 messages.

 

Thanks in advance...and the product works great!

Coordinator
Apr 6, 2011 at 5:16 AM

There is currently no support for specifying the maximum number of messages to be returned. However, the protocol and the backend implementation could be reasonably easily modified to that effect.

Depending on the semantics you want to achieve, you may configure the backend implementation to only maintain a specific number of most recent messages per topic (say 10), thus ensuring the subscribers will never receive more.

Alternatively, you can implement the logic in the subscription handler on the client to unsubscribe from a topic once the specific number of messages has been received.