I'd like to create a consumer which stacks arriving messages, and waits:
- until
n
messages have arrived. t
seconds are elapsed.
to process the whole stack of messages.
Pre-fetching is not what I'm looking for. What I really need is to process messages together.
class MyListener(stomp.ConnectionListener):
def on_message(self, headers, body):
print ("Just received ONE message\n"
"I should wait for n-1 others\n"
"or t seconds before processing")