public interface IterableConsumer extends MessageConsumer
Modifier and Type | Method and Description |
---|---|
Message |
nextMessage(java.time.Duration timeout)
Read the next message.
|
Message |
nextMessage(long timeoutMillis)
Read the next message.
|
close, getCachedConsumerInfo, getConsumerInfo, getConsumerName, isFinished, isStopped, stop
Message nextMessage(java.time.Duration timeout) throws java.lang.InterruptedException, JetStreamStatusCheckedException
timeout
- the maximum time to waitjava.lang.InterruptedException
- if one is thrown, in order to propagate it upJetStreamStatusCheckedException
- an exception representing a status that requires attention,
such as the consumer was deleted on the server in the middle of use.Message nextMessage(long timeoutMillis) throws java.lang.InterruptedException, JetStreamStatusCheckedException
timeoutMillis
- the maximum time to waitjava.lang.InterruptedException
- if one is thrown, in order to propagate it upJetStreamStatusCheckedException
- an exception representing a status that requires attention,
such as the consumer was deleted on the server in the middle of use.