Reputation: 32715
In my Storm topology, while processing a stream, I want to delay the processing of some messages until some future points in time. What are some reasonable options for doing this?
So far, I have thought about the following:
Thread.sleep
. (However, based on some discussions, this is not a recommended way to efficiently utilize Storm's resources.)Upvotes: 5
Views: 1155
Reputation: 32715
Use an external message queue to implement a time-delay queue.
Since Storm is fault-tolerant and horizontally distributed, it would make sense to pick a message queue that fits that style, such as:
Upvotes: 2
Reputation: 2929
We are using topology tick tuples to process pending tuples in bulk. It basically just stores them in memory on every normal tuple and when it receives a tick tuple it processes them into storage/indexing using bulk/pipelined processing.
We also use redis in cases where we have enormous spikes in volume, if a volume spike detected all tuples redirect to local redis storage on each of the hosts and then get pushed back into topology processing after volume dies down. Our situation might not be applicable to yours, just my 2c.
Upvotes: 5