public interface JetStreamReader
Note: This interface is superseded by ConsumerContext. For examples for recommended usage see JetStream.
| Modifier and Type | Method and Description |
|---|---|
Message |
nextMessage(java.time.Duration timeout)
Read the next message.
|
Message |
nextMessage(long timeoutMillis)
Read the next message.
|
void |
stop()
Stop getting more messages from the server.
|
Message nextMessage(java.time.Duration timeout) throws java.lang.InterruptedException
timeout - the maximum time to waitjava.lang.InterruptedException - if one is thrown, in order to propagate it upjava.lang.IllegalStateException - if the subscription belongs to a dispatcher, or is not activeMessage nextMessage(long timeoutMillis) throws java.lang.InterruptedException
timeoutMillis - the maximum time to waitjava.lang.InterruptedException - if one is thrown, in order to propagate it upjava.lang.IllegalStateException - if the subscription belongs to a dispatcher, or is not activevoid stop()