NATS .NET Client
1.1.4
The NATS.io .NET C# Client
|
Inherited by NATS.Client.JetStream.JetStream.
Public Member Functions | |
PublishAck | Publish (string subject, byte[] data) |
PublishAck | Publish (string subject, MsgHeader headers, byte[] data) |
PublishAck | Publish (string subject, byte[] data, PublishOptions publishOptions) |
PublishAck | Publish (string subject, MsgHeader headers, byte[] data, PublishOptions publishOptions) |
PublishAck | Publish (Msg message) |
PublishAck | Publish (Msg message, PublishOptions publishOptions) |
Task< PublishAck > | PublishAsync (string subject, byte[] data) |
Task< PublishAck > | PublishAsync (string subject, MsgHeader headers, byte[] data) |
Task< PublishAck > | PublishAsync (string subject, byte[] data, PublishOptions publishOptions) |
Task< PublishAck > | PublishAsync (string subject, MsgHeader headers, byte[] data, PublishOptions publishOptions) |
Task< PublishAck > | PublishAsync (Msg message) |
Task< PublishAck > | PublishAsync (Msg message, PublishOptions publishOptions) |
IJetStreamPullSubscription | PullSubscribe (string subject, PullSubscribeOptions options) |
IJetStreamPullAsyncSubscription | PullSubscribeAsync (string subject, EventHandler< MsgHandlerEventArgs > handler, PullSubscribeOptions options) |
IJetStreamPushAsyncSubscription | PushSubscribeAsync (string subject, EventHandler< MsgHandlerEventArgs > handler, bool autoAck) |
IJetStreamPushAsyncSubscription | PushSubscribeAsync (string subject, EventHandler< MsgHandlerEventArgs > handler, bool autoAck, PushSubscribeOptions options) |
IJetStreamPushAsyncSubscription | PushSubscribeAsync (string subject, string queue, EventHandler< MsgHandlerEventArgs > handler, bool autoAck) |
IJetStreamPushAsyncSubscription | PushSubscribeAsync (string subject, string queue, EventHandler< MsgHandlerEventArgs > handler, bool autoAck, PushSubscribeOptions options) |
IJetStreamPushSyncSubscription | PushSubscribeSync (string subject) |
IJetStreamPushSyncSubscription | PushSubscribeSync (string subject, PushSubscribeOptions options) |
IJetStreamPushSyncSubscription | PushSubscribeSync (string subject, string queue) |
IJetStreamPushSyncSubscription | PushSubscribeSync (string subject, string queue, PushSubscribeOptions options) |
IStreamContext | GetStreamContext (string streamName) |
IConsumerContext | GetConsumerContext (string streamName, string consumerName) |
This is the JetStream context for creation and access to persistent streams and consumers.
A JetStream context is created by the IConnect.JetStreamContext() API.
IConsumerContext NATS.Client.JetStream.IJetStream.GetConsumerContext | ( | string | streamName, |
string | consumerName | ||
) |
Create a consumer context for a specific named stream and specific named consumer. Verifies that the stream and consumer exist.
streamName | the name of the stream |
consumerName | the name of the consumer |
IStreamContext NATS.Client.JetStream.IJetStream.GetStreamContext | ( | string | streamName | ) |
Create a stream context for a specific named stream. Verifies that the stream exists.
streamName | the name of the stream |
PublishAck NATS.Client.JetStream.IJetStream.Publish | ( | Msg | message | ) |
PublishAck NATS.Client.JetStream.IJetStream.Publish | ( | Msg | message, |
PublishOptions | publishOptions | ||
) |
PublishAck NATS.Client.JetStream.IJetStream.Publish | ( | string | subject, |
byte[] | data | ||
) |
Send a message to the specified subject and waits for a response from Jetstream. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
PublishAck NATS.Client.JetStream.IJetStream.Publish | ( | string | subject, |
byte[] | data, | ||
PublishOptions | publishOptions | ||
) |
Send a message to the specified subject and waits for a response from Jetstream. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
publishOptions | Options for publishing. |
PublishAck NATS.Client.JetStream.IJetStream.Publish | ( | string | subject, |
MsgHeader | headers, | ||
byte[] | data | ||
) |
Send a message to the specified subject and waits for a response from Jetstream. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
headers | Optional headers to publish with the message. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
PublishAck NATS.Client.JetStream.IJetStream.Publish | ( | string | subject, |
MsgHeader | headers, | ||
byte[] | data, | ||
PublishOptions | publishOptions | ||
) |
Send a message to the specified subject and waits for a response from Jetstream. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
headers | Optional headers to publish with the message. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
publishOptions | Options for publishing. |
Task< PublishAck > NATS.Client.JetStream.IJetStream.PublishAsync | ( | Msg | message | ) |
Task< PublishAck > NATS.Client.JetStream.IJetStream.PublishAsync | ( | Msg | message, |
PublishOptions | publishOptions | ||
) |
Task< PublishAck > NATS.Client.JetStream.IJetStream.PublishAsync | ( | string | subject, |
byte[] | data | ||
) |
Asynchronously sends a message to the specified subject and waits for a response from Jetstream. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
Task< PublishAck > NATS.Client.JetStream.IJetStream.PublishAsync | ( | string | subject, |
byte[] | data, | ||
PublishOptions | publishOptions | ||
) |
Asynchronously sends data to the specified subject. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
publishOptions | Options for publishing. |
Task< PublishAck > NATS.Client.JetStream.IJetStream.PublishAsync | ( | string | subject, |
MsgHeader | headers, | ||
byte[] | data | ||
) |
Asynchronously sends a message to the specified subject and waits for a response from Jetstream. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
headers | Optional headers to publish with the message. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
Task< PublishAck > NATS.Client.JetStream.IJetStream.PublishAsync | ( | string | subject, |
MsgHeader | headers, | ||
byte[] | data, | ||
PublishOptions | publishOptions | ||
) |
Asynchronously sends data to the specified subject. The message body will not be copied.
The expected usage with string content is something like:
where the sender creates a byte array immediately before calling publish.
subject | The subject to publish data to over the current connection. |
headers | Optional headers to publish with the message. |
data | An array of type byte that contains the data to publish to the connected NATS server. |
publishOptions | Options for publishing. |
IJetStreamPullSubscription NATS.Client.JetStream.IJetStream.PullSubscribe | ( | string | subject, |
PullSubscribeOptions | options | ||
) |
Creates a JetStream pull subscription. Pull subscriptions fetch messages from the server in batches.
subject | The subject on which to listen for messages. The subject can have wildcards (partial: * , full: > ). |
options | Pull Subscribe options for this subscription. |
IJetStreamPullAsyncSubscription NATS.Client.JetStream.IJetStream.PullSubscribeAsync | ( | string | subject, |
EventHandler< MsgHandlerEventArgs > | handler, | ||
PullSubscribeOptions | options | ||
) |
Creates a JetStream pull subscription with an eventHandler. Pull subscriptions fetch messages from the server in batches.
subject | The subject on which to listen for messages. The subject can have wildcards (partial: * , full: > ). |
handler | The EventHandler<MsgHandlerEventArgs> invoked when messages are received on the returned IAsyncSubscription. |
options | Pull Subscribe options for this subscription. |
IJetStreamPushAsyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeAsync | ( | string | subject, |
EventHandler< MsgHandlerEventArgs > | handler, | ||
bool | autoAck | ||
) |
Creates a push subscriber on the given subject , and begins delivering messages to the given event handler.
All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message.
The IJetStreamSubscription returned will start delivering messages to the event handler as soon as they are received.
subject | The subject on which to listen for messages. The subject can have wildcards (partial: * , full: > ). |
handler | The EventHandler<MsgHandlerEventArgs> invoked when messages are received on the returned IAsyncSubscription. |
autoAck | Whether or not to auto ack the message |
IJetStreamPushAsyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeAsync | ( | string | subject, |
EventHandler< MsgHandlerEventArgs > | handler, | ||
bool | autoAck, | ||
PushSubscribeOptions | options | ||
) |
Creates a push subscriber on the given subject , and begins delivering messages to the given event handler.
All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message.
The IJetStreamSubscription returned will start delivering messages to the event handler as soon as they are received.
subject | The subject on which to listen for messages. The subject can have wildcards (partial: * , full: > ). |
handler | The EventHandler<MsgHandlerEventArgs> invoked when messages are received on the returned IJetStreamPushAsyncSubscription. |
autoAck | Whether or not to auto ack the message |
options | Pull Subscribe options for this subscription. |
IJetStreamPushAsyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeAsync | ( | string | subject, |
string | queue, | ||
EventHandler< MsgHandlerEventArgs > | handler, | ||
bool | autoAck | ||
) |
Creates an subscriber on the given subject , and begins delivering messages to the given event handler.
All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message.
The IJetStreamSubscription returned will start delivering messages to the event handler as soon as they are received.
subject | The subject on which to listen for messages. The subject can have wildcards (partial: * , full: > ). |
queue | The name of the queue group in which to participate. |
handler | The EventHandler<MsgHandlerEventArgs> invoked when messages are received on the returned IAsyncSubscription. |
autoAck | Whether or not to auto ack the message |
IJetStreamPushAsyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeAsync | ( | string | subject, |
string | queue, | ||
EventHandler< MsgHandlerEventArgs > | handler, | ||
bool | autoAck, | ||
PushSubscribeOptions | options | ||
) |
Creates an subscriber on the given subject , and begins delivering messages to the given event handler.
All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message.
The IJetStreamSubscription returned will start delivering messages to the event handler as soon as they are received.
subject | The subject on which to listen for messages. The subject can have wildcards (partial: * , full: > ). |
queue | The name of the queue group in which to participate. |
handler | The EventHandler<MsgHandlerEventArgs> invoked when messages are received on the returned IAsyncSubscription. |
autoAck | Whether or not to auto ack the message |
options | JetStream push subscription options. |
IJetStreamPushSyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeSync | ( | string | subject | ) |
Creates a synchronous JetStream subscriber on the given subject .
subject | The subject on which to listen for messages. |
IJetStreamPushSyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeSync | ( | string | subject, |
PushSubscribeOptions | options | ||
) |
Creates a synchronous JetStream subscriber on the given subject .
subject | The subject on which to listen for messages. |
options | JetStream subscription options. |
IJetStreamPushSyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeSync | ( | string | subject, |
string | queue | ||
) |
Creates a synchronous JetStream queue subscriber on the given subject .
All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message synchronously.
subject | The subject on which to listen for messages. |
queue | The name of the queue group in which to participate. |
IJetStreamPushSyncSubscription NATS.Client.JetStream.IJetStream.PushSubscribeSync | ( | string | subject, |
string | queue, | ||
PushSubscribeOptions | options | ||
) |
Creates a synchronous JetStream queue subscriber on the given subject .
All subscribers with the same queue name will form the queue group and only one member of the group will be selected to receive any given message synchronously.
subject | The subject on which to listen for messages. |
queue | The name of the queue group in which to participate. |
options | JetStream subscription options. |