Inherited by NATS.Client.JetStream.StreamContext.
The Stream Context provide a set of operations for managing the stream and its contents and for managing consumers.
◆ CreateOrderedConsumer()
IOrderedConsumerContext NATS.Client.JetStream.IStreamContext.CreateOrderedConsumer |
( |
OrderedConsumerConfiguration |
config | ) |
|
Management function to creates a consumer on this stream.
- Parameters
-
config | the consumer configuration to use. |
- Returns
- consumer information.
◆ CreateOrUpdateConsumer()
IConsumerContext NATS.Client.JetStream.IStreamContext.CreateOrUpdateConsumer |
( |
ConsumerConfiguration |
config | ) |
|
Create an ordered consumer context for the context's stream.
- Parameters
-
config | the configuration for the ordered consumer |
- Returns
- an instance of IConsumerContext
◆ DeleteConsumer()
bool NATS.Client.JetStream.IStreamContext.DeleteConsumer |
( |
string |
consumerName | ) |
|
Management function to deletes a consumer.
- Parameters
-
consumerName | the name of the consumer. |
- Returns
- true if the delete succeeded
◆ DeleteMessage() [1/2]
bool NATS.Client.JetStream.IStreamContext.DeleteMessage |
( |
ulong |
seq | ) |
|
Deletes a message, overwriting the message data with garbage This can be considered an expensive (time-consuming) operation, but is more secure.
- Parameters
-
seq | the sequence number of the message |
- Returns
- true if the delete succeeded
◆ DeleteMessage() [2/2]
bool NATS.Client.JetStream.IStreamContext.DeleteMessage |
( |
ulong |
seq, |
|
|
bool |
erase |
|
) |
| |
Deletes a message, optionally erasing the content of the message.
- Parameters
-
seq | the sequence number of the message |
erase | whether to erase the message (overwriting with garbage) or only mark it as erased. |
- Returns
- true if the delete succeeded
◆ GetConsumerContext()
IConsumerContext NATS.Client.JetStream.IStreamContext.GetConsumerContext |
( |
string |
consumerName | ) |
|
Create a consumer context for on the context's stream and specific named consumer. Verifies that the consumer exists.
- Parameters
-
consumerName | the name of the consumer |
- Returns
- an instance of IConsumerContext
◆ GetConsumerInfo()
ConsumerInfo NATS.Client.JetStream.IStreamContext.GetConsumerInfo |
( |
string |
consumerName | ) |
|
Gets the info for an existing consumer.
- Parameters
-
consumerName | the name of the consumer. |
- Returns
- consumer information
◆ GetConsumerNames()
IList< string > NATS.Client.JetStream.IStreamContext.GetConsumerNames |
( |
| ) |
|
Return a list of consumers by name
- Returns
- The list of names
◆ GetConsumers()
IList< ConsumerInfo > NATS.Client.JetStream.IStreamContext.GetConsumers |
( |
| ) |
|
Return a list of ConsumerInfo objects.
- Returns
- The list of ConsumerInfo
◆ GetFirstMessage()
MessageInfo NATS.Client.JetStream.IStreamContext.GetFirstMessage |
( |
string |
subject | ) |
|
Get MessageInfo for the first message of the subject.
- Parameters
-
subject | the subject to get the first message for. |
- Returns
- The MessageInfo
◆ GetLastMessage()
MessageInfo NATS.Client.JetStream.IStreamContext.GetLastMessage |
( |
string |
subject | ) |
|
Get MessageInfo for the last message of the subject.
- Parameters
-
subject | the subject to get the last message for. |
- Returns
- The MessageInfo
◆ GetMessage()
MessageInfo NATS.Client.JetStream.IStreamContext.GetMessage |
( |
ulong |
seq | ) |
|
Get MessageInfo for the message with the exact sequence in the stream.
- Parameters
-
seq | the sequence number of the message |
- Returns
- The MessageInfo
◆ GetNextMessage()
MessageInfo NATS.Client.JetStream.IStreamContext.GetNextMessage |
( |
ulong |
seq, |
|
|
string |
subject |
|
) |
| |
Get MessageInfo for the message of the message sequence is equal to or greater the requested sequence for the subject.
- Parameters
-
seq | the first possible sequence number of the message |
subject | the subject to get the next message for. |
- Returns
- The MessageInfo
◆ GetStreamInfo() [1/2]
StreamInfo NATS.Client.JetStream.IStreamContext.GetStreamInfo |
( |
| ) |
|
Gets information about the stream for this context. Does not retrieve any optional data. See the overloaded version that accepts StreamInfoOptions
- Returns
- stream information
◆ GetStreamInfo() [2/2]
StreamInfo NATS.Client.JetStream.IStreamContext.GetStreamInfo |
( |
StreamInfoOptions |
options | ) |
|
Gets information about the stream for this context.
- Parameters
-
options | the stream info options. If null, request will not return any optional data. |
- Returns
- stream information
◆ Purge() [1/2]
PurgeResponse NATS.Client.JetStream.IStreamContext.Purge |
( |
| ) |
|
Purge stream messages
- Returns
- PurgeResponse the purge response
◆ Purge() [2/2]
PurgeResponse NATS.Client.JetStream.IStreamContext.Purge |
( |
PurgeOptions |
options | ) |
|
Purge messages for a specific subject
- Parameters
-
- Returns
- PurgeResponse the purge response
◆ StreamName
string NATS.Client.JetStream.IStreamContext.StreamName |
|
get |
Gets the stream name that was used to create the context.
- Returns
- the stream name
The documentation for this interface was generated from the following file: