Inherited by NATS.Client.JetStream.JetStreamManagement.
|
AccountStatistics | GetAccountStatistics () |
|
StreamInfo | AddStream (StreamConfiguration config) |
|
StreamInfo | UpdateStream (StreamConfiguration config) |
|
bool | DeleteStream (string streamName) |
|
StreamInfo | GetStreamInfo (string streamName) |
|
StreamInfo | GetStreamInfo (string streamName, StreamInfoOptions options) |
|
PurgeResponse | PurgeStream (string streamName) |
|
PurgeResponse | PurgeStream (string streamName, PurgeOptions options) |
|
ConsumerInfo | AddOrUpdateConsumer (string streamName, ConsumerConfiguration config) |
|
bool | DeleteConsumer (string streamName, string consumer) |
|
ConsumerPauseResponse | PauseConsumer (string streamName, string consumer, DateTime pauseUntil) |
|
bool | ResumeConsumer (string streamName, string consumer) |
|
ConsumerInfo | GetConsumerInfo (string streamName, string consumer) |
|
IList< string > | GetConsumerNames (string streamName) |
|
IList< ConsumerInfo > | GetConsumers (string streamName) |
|
IList< string > | GetStreamNames () |
|
IList< string > | GetStreamNames (string subjectFilter) |
|
IList< StreamInfo > | GetStreams () |
|
IList< StreamInfo > | GetStreams (string subjectFilter) |
|
MessageInfo | GetMessage (string streamName, ulong sequence) |
|
MessageInfo | GetLastMessage (string streamName, string subject) |
|
MessageInfo | GetFirstMessage (string streamName, string subject) |
|
MessageInfo | GetNextMessage (string streamName, ulong sequence, string subject) |
|
bool | DeleteMessage (string streamName, ulong sequence) |
|
bool | DeleteMessage (string streamName, ulong sequence, bool erase) |
|
IJetStream | GetJetStreamContext () |
|
This is the JetStream management API to programatically create, delete, and update various JetStream objects.
◆ AddOrUpdateConsumer()
ConsumerInfo NATS.Client.JetStream.IJetStreamManagement.AddOrUpdateConsumer |
( |
string |
streamName, |
|
|
ConsumerConfiguration |
config |
|
) |
| |
Adds or updates a consumer.
- Parameters
-
streamName | The name of the stream the consumer is attached to. |
config | The consumer configuration to use. |
- Returns
◆ AddStream()
StreamInfo NATS.Client.JetStream.IJetStreamManagement.AddStream |
( |
StreamConfiguration |
config | ) |
|
Loads or creates a stream.
- Parameters
-
config | The stream configuration to use. |
- Returns
- Stream information
◆ DeleteConsumer()
bool NATS.Client.JetStream.IJetStreamManagement.DeleteConsumer |
( |
string |
streamName, |
|
|
string |
consumer |
|
) |
| |
Deletes a consumer.
- Parameters
-
streamName | The name of the stream the consumer is attached to. |
consumer | The name of the consumer. |
- Returns
- True if the consumer was deleted.
◆ DeleteMessage() [1/2]
bool NATS.Client.JetStream.IJetStreamManagement.DeleteMessage |
( |
string |
streamName, |
|
|
ulong |
sequence |
|
) |
| |
Deletes a message, overwriting the message data with garbage This can be considered an expensive (time consuming) operation, but is more secure.
- Parameters
-
streamName | The name of the stream. |
sequence | The stream sequence number of the message. |
- Returns
- True if the message was deleted.
◆ DeleteMessage() [2/2]
bool NATS.Client.JetStream.IJetStreamManagement.DeleteMessage |
( |
string |
streamName, |
|
|
ulong |
sequence, |
|
|
bool |
erase |
|
) |
| |
Deletes a message, optionally erasing the content of the message.
- Parameters
-
streamName | The name of the stream. |
sequence | The stream sequence number of the message. |
erase | Whether to erase the message (overwriting with garbage) or only mark it as erased. |
- Returns
- True if the message was deleted.
◆ DeleteStream()
bool NATS.Client.JetStream.IJetStreamManagement.DeleteStream |
( |
string |
streamName | ) |
|
Deletes an existing stream.
- Parameters
-
streamName | The name of the stream. |
- Returns
- true if the delete succeeded. Usually throws a NATSJetStreamException otherwise
◆ GetConsumerInfo()
ConsumerInfo NATS.Client.JetStream.IJetStreamManagement.GetConsumerInfo |
( |
string |
streamName, |
|
|
string |
consumer |
|
) |
| |
Gets information for an existing consumer.
- Parameters
-
streamName | The name of the stream the consumer is attached to. |
consumer | The name of the consumer. |
- Returns
- Consumer information
◆ GetConsumerNames()
IList< string > NATS.Client.JetStream.IJetStreamManagement.GetConsumerNames |
( |
string |
streamName | ) |
|
Gets all consumers attached to a stream.
- Parameters
-
streamName | The name of the stream. |
- Returns
- An array of consumer names.
◆ GetConsumers()
IList< ConsumerInfo > NATS.Client.JetStream.IJetStreamManagement.GetConsumers |
( |
string |
streamName | ) |
|
Get consumer information for all consumers on a stream.
- Parameters
-
streamName | The name of the stream. |
- Returns
- An array of consumer information objects.
◆ GetFirstMessage()
MessageInfo NATS.Client.JetStream.IJetStreamManagement.GetFirstMessage |
( |
string |
streamName, |
|
|
string |
subject |
|
) |
| |
Get MessageInfo for the first message of the subject.
- Parameters
-
streamName | The name of the stream. |
subject | The subject to get the first message for. |
- Returns
- Message information.
◆ GetJetStreamContext()
IJetStream NATS.Client.JetStream.IJetStreamManagement.GetJetStreamContext |
( |
| ) |
|
Gets a context for publishing and subscribing to subjects backed by Jetstream streams and consumers, using the same connection and JetStreamOptions as the management.
- Returns
- The JetStream Context
◆ GetLastMessage()
MessageInfo NATS.Client.JetStream.IJetStreamManagement.GetLastMessage |
( |
string |
streamName, |
|
|
string |
subject |
|
) |
| |
Get MessageInfo for the last message of the subject.
- Parameters
-
streamName | The name of the stream. |
subject | The subject to get the last message for. |
- Returns
- Message information.
◆ GetMessage()
MessageInfo NATS.Client.JetStream.IJetStreamManagement.GetMessage |
( |
string |
streamName, |
|
|
ulong |
sequence |
|
) |
| |
Get MessageInfo for the message with the exact sequence in the stream.
- Parameters
-
streamName | The name of the stream. |
sequence | The stream sequence number of the message. |
- Returns
- Message information.
◆ GetNextMessage()
MessageInfo NATS.Client.JetStream.IJetStreamManagement.GetNextMessage |
( |
string |
streamName, |
|
|
ulong |
sequence, |
|
|
string |
subject |
|
) |
| |
Get MessageInfo for the message of the message sequence is equal to or greater the requested sequence for the subject.
- Parameters
-
streamName | The name of the stream. |
sequence | The first possible sequence number of the message. |
subject | The subject to get the next message for. |
- Returns
- Message information.
◆ GetStreamInfo() [1/2]
StreamInfo NATS.Client.JetStream.IJetStreamManagement.GetStreamInfo |
( |
string |
streamName | ) |
|
Get information about a stream. Does not retrieve any optional data. See the overloaded version that accepts StreamInfoOptions
- Parameters
-
streamName | The name of the stream. |
- Returns
- Stream information
◆ GetStreamInfo() [2/2]
StreamInfo NATS.Client.JetStream.IJetStreamManagement.GetStreamInfo |
( |
string |
streamName, |
|
|
StreamInfoOptions |
options |
|
) |
| |
Get information about a stream, and include optional information as defined in the StreamInfoOptions.
- Parameters
-
streamName | The name of the stream. |
options | the stream info options. If null, request will not return any optional data. |
- Returns
- Stream information
◆ GetStreamNames() [1/2]
IList< string > NATS.Client.JetStream.IJetStreamManagement.GetStreamNames |
( |
| ) |
|
Gets the names of all streams.
- Returns
- An array of stream names.
◆ GetStreamNames() [2/2]
IList< string > NATS.Client.JetStream.IJetStreamManagement.GetStreamNames |
( |
string |
subjectFilter | ) |
|
Get a list of stream names that have subjects matching the subject filter.
- Parameters
-
subjectFilter | The subject. Wildcards are allowed. |
- Returns
◆ GetStreams() [1/2]
IList< StreamInfo > NATS.Client.JetStream.IJetStreamManagement.GetStreams |
( |
| ) |
|
Gets stream information about all streams.
- Returns
- An array of stream information objects.
◆ GetStreams() [2/2]
IList< StreamInfo > NATS.Client.JetStream.IJetStreamManagement.GetStreams |
( |
string |
subjectFilter | ) |
|
Gets stream information about all streams that have subjects matching the filter.
- Returns
- An array of stream information objects.
◆ PauseConsumer()
ConsumerPauseResponse NATS.Client.JetStream.IJetStreamManagement.PauseConsumer |
( |
string |
streamName, |
|
|
string |
consumer, |
|
|
DateTime |
pauseUntil |
|
) |
| |
Pauses a consumer.
- Parameters
-
streamName | The name of the stream the consumer is attached to. |
consumer | The name of the consumer. |
pauseUntil | Consumer is paused until this time. |
- Returns
- ConsumerPauseResponse.
◆ PurgeStream() [1/2]
PurgeResponse NATS.Client.JetStream.IJetStreamManagement.PurgeStream |
( |
string |
streamName | ) |
|
Purges all messages in a stream.
- Parameters
-
streamName | The name of the stream. |
- Returns
- The result of the purge.
◆ PurgeStream() [2/2]
PurgeResponse NATS.Client.JetStream.IJetStreamManagement.PurgeStream |
( |
string |
streamName, |
|
|
PurgeOptions |
options |
|
) |
| |
Purges all messages in a stream.
- Parameters
-
streamName | The name of the stream. |
options | The purge options. |
- Returns
- The result of the purge.
◆ ResumeConsumer()
bool NATS.Client.JetStream.IJetStreamManagement.ResumeConsumer |
( |
string |
streamName, |
|
|
string |
consumer |
|
) |
| |
Resumes a consumer.
- Parameters
-
streamName | The name of the stream the consumer is attached to. |
consumer | The name of the consumer. |
- Returns
- True if the resume succeeded.
◆ UpdateStream()
StreamInfo NATS.Client.JetStream.IJetStreamManagement.UpdateStream |
( |
StreamConfiguration |
config | ) |
|
Updates an existing stream.
- Parameters
-
config | The stream configuration to use. |
- Returns
- Stream information
The documentation for this interface was generated from the following file: