public interface MessageConsumer
extends java.lang.AutoCloseable
Modifier and Type | Method and Description |
---|---|
ConsumerInfo |
getCachedConsumerInfo()
Gets information about the consumer behind this subscription.
|
ConsumerInfo |
getConsumerInfo()
Gets information about the consumer behind this subscription.
|
java.lang.String |
getConsumerName()
Gets the consumer name associated with the subscription.
|
boolean |
isFinished()
Finish indicates all messages have been received from the server.
|
boolean |
isStopped()
Stopped indicates whether consuming has been stopped.
|
void |
stop()
Stop the MessageConsumer from asking for any more messages from the server.
|
java.lang.String getConsumerName()
ConsumerInfo getConsumerInfo() throws java.io.IOException, JetStreamApiException
java.io.IOException
- covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException
- the request had an error related to the dataConsumerInfo getCachedConsumerInfo()
void stop()
boolean isStopped()
boolean isFinished()