Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Kafka >> mail # user >> ways to exit the blocking iterator

Copy link to this message
ways to exit the blocking iterator
I need to exit the blocking consumer iterator on certain conditions ; do
some other processing and then resume the blocking iterartor. All of the
work is dependent on the "other processing".

Upon looking at the code, it seems that
can take a shutdown command that will trigger the iterator to come out of
the blocking state.

Two Questions....
(a) Is there some sample code  that will issue this shutdown command?
(b) Is there any implication to the semantics of the queue that this
iterator is blocking on ?

(for example)


should ideally deliver a unblock message to  the iterator and then continue
delivering the messages to the queue ; and by implication; to the consumer
iterator (of course, in 0.7, also recreating the MessageStream due to the
timeout issue)