public interface JetStreamManagement
| Modifier and Type | Method and Description |
|---|---|
ConsumerInfo |
addOrUpdateConsumer(java.lang.String streamName,
ConsumerConfiguration config)
Loads or creates a consumer.
|
StreamInfo |
addStream(StreamConfiguration config)
Loads or creates a stream.
|
boolean |
deleteConsumer(java.lang.String streamName,
java.lang.String consumer)
Deletes a consumer.
|
boolean |
deleteMessage(java.lang.String streamName,
long seq)
Deletes a message.
|
boolean |
deleteStream(java.lang.String streamName)
Deletes an existing stream.
|
AccountStatistics |
getAccountStatistics()
Gets the account statistics for the logged in account.
|
ConsumerInfo |
getConsumerInfo(java.lang.String streamName,
java.lang.String consumer)
Gets the info for an existing consumer.
|
java.util.List<java.lang.String> |
getConsumerNames(java.lang.String streamName)
Return a list of consumers by name
|
java.util.List<ConsumerInfo> |
getConsumers(java.lang.String streamName)
Return a list of ConsumerInfo objects.
|
MessageInfo |
getMessage(java.lang.String streamName,
long seq)
Return an info object about a message
|
StreamInfo |
getStreamInfo(java.lang.String streamName)
Gets the info for an existing stream.
|
java.util.List<java.lang.String> |
getStreamNames()
Return a list of streams by name
|
java.util.List<StreamInfo> |
getStreams()
Return a list of StreamInfo objects.
|
PurgeResponse |
purgeStream(java.lang.String streamName)
Purge stream messages
|
PurgeResponse |
purgeStream(java.lang.String streamName,
PurgeOptions options)
Purge messages for a specific subject
|
StreamInfo |
updateStream(StreamConfiguration config)
Updates an existing stream.
|
AccountStatistics getAccountStatistics() 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 datajava.lang.IllegalArgumentException - the server is not JetStream enabledStreamInfo addStream(StreamConfiguration config) throws java.io.IOException, JetStreamApiException
config - the stream configuration to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.lang.IllegalArgumentException - the configuration is missing or invalidStreamInfo updateStream(StreamConfiguration config) throws java.io.IOException, JetStreamApiException
config - the stream configuration to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.lang.IllegalArgumentException - the configuration is missing or invalidboolean deleteStream(java.lang.String streamName)
throws java.io.IOException,
JetStreamApiException
streamName - the stream name to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataStreamInfo getStreamInfo(java.lang.String streamName) throws java.io.IOException, JetStreamApiException
streamName - the stream name to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataPurgeResponse purgeStream(java.lang.String streamName) throws java.io.IOException, JetStreamApiException
streamName - the stream name to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataPurgeResponse purgeStream(java.lang.String streamName, PurgeOptions options) throws java.io.IOException, JetStreamApiException
streamName - the stream name to use.options - the purge optionsjava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the dataConsumerInfo addOrUpdateConsumer(java.lang.String streamName, ConsumerConfiguration config) throws java.io.IOException, JetStreamApiException
streamName - name of the streamconfig - the consumer configuration to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the databoolean deleteConsumer(java.lang.String streamName,
java.lang.String consumer)
throws java.io.IOException,
JetStreamApiException
streamName - name of the streamconsumer - the name of the consumer.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 getConsumerInfo(java.lang.String streamName, java.lang.String consumer) throws java.io.IOException, JetStreamApiException
streamName - name of the streamconsumer - the consumer name to use.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.util.List<java.lang.String> getConsumerNames(java.lang.String streamName)
throws java.io.IOException,
JetStreamApiException
streamName - the name of the stream.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.util.List<ConsumerInfo> getConsumers(java.lang.String streamName) throws java.io.IOException, JetStreamApiException
streamName - the name of the stream.java.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the datajava.util.List<java.lang.String> getStreamNames()
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 datajava.util.List<StreamInfo> getStreams() 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 dataMessageInfo getMessage(java.lang.String streamName, long seq) throws java.io.IOException, JetStreamApiException
streamName - the name of the stream.seq - the sequence number of the messagejava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the databoolean deleteMessage(java.lang.String streamName,
long seq)
throws java.io.IOException,
JetStreamApiException
streamName - name of the streamseq - the sequence number of the messagejava.io.IOException - covers various communication issues with the NATS
server such as timeout or interruptionJetStreamApiException - the request had an error related to the data