NATS .NET Client
1.1.4
The NATS.io .NET C# Client
|
Inherited by NATS.Client.JetStream.JetStreamMsg.
Public Member Functions | |
Msg () | |
Msg (string subject, string reply, MsgHeader header, byte[] data) | |
Msg (string subject, MsgHeader header, byte[] data) | |
Msg (string subject, string reply, byte[] data) | |
Msg (string subject, byte[] data) | |
Msg (string subject) | |
void | AssignData (byte[] data) |
void | Respond (byte[] data) |
override string | ToString () |
virtual void | Ack () |
virtual void | AckSync (int timeout) |
virtual void | Nak () |
virtual void | NakWithDelay (Duration nakDelay) |
virtual void | NakWithDelay (long nakDelayMillis) |
virtual void | Term () |
virtual void | InProgress () |
Properties | |
string | Subject [get, set] |
string | Reply [get, set] |
byte[] | Data [get, set] |
ISubscription | ArrivalSubcription [get] |
ISubscription | ArrivalSubscription [get] |
MsgHeader | Header [get, set] |
bool | HasHeaders [get] |
MsgStatus | Status [get] |
bool | HasStatus [get] |
virtual JetStream.MetaData | MetaData [get] |
AckType | LastAck [get] |
virtual bool | IsJetStream [get] |
long | ConsumeByteCount [get] |
A NATS message is an object encapsulating a subject, optional reply payload, optional header, and subscription information, sent or received by the client application.
NATS.Client.Msg.Msg | ( | string | subject, |
string | reply, | ||
MsgHeader | header, | ||
byte[] | data | ||
) |
Initializes a new instance of the Msg class with a subject, reply, header, and data.
subject | Subject of the message. |
reply | A reply subject, or null . |
header | Message headers or null . |
data | A byte array containing the message payload. |
NATS.Client.Msg.Msg | ( | string | subject, |
MsgHeader | header, | ||
byte[] | data | ||
) |
Initializes a new instance of the Msg class with a subject, header, and data.
subject | Subject of the message. |
header | Message headers or null . |
data | A byte array containing the message payload. |
NATS.Client.Msg.Msg | ( | string | subject, |
string | reply, | ||
byte[] | data | ||
) |
Initializes a new instance of the Msg class with a subject, reply, and data.
subject | Subject of the message. |
reply | A reply subject, or null . |
data | A byte array containing the message payload. |
NATS.Client.Msg.Msg | ( | string | subject, |
byte[] | data | ||
) |
Initializes a new instance of the Msg class with a subject and data.
subject | Subject of the message. |
data | A byte array containing the message payload. |
NATS.Client.Msg.Msg | ( | string | subject | ) |
Initializes a new instance of the Msg class with a subject and no data.
subject | Subject of the message. |
|
virtual |
|
virtual |
void NATS.Client.Msg.AssignData | ( | byte[] | data | ) |
Assigns the data of the message.
This is a direct assignment, to avoid expensive copy operations. A change to the passed byte array will be changed in the message.
The calling application is responsible for the data integrity in the message.
data | a bytes buffer of data. |
|
virtual |
Indicates that this message is being worked on and reset redelivery timer in the server.
This is a NOOP for standard NATS messages.
|
virtual |
|
virtual |
|
virtual |
void NATS.Client.Msg.Respond | ( | byte[] | data | ) |
Send a response to the message on the arrival subscription.
data | The response payload to send. |
NATSException | Reply is null or empty.-or-ArrivalSubscription is null. |
|
virtual |
Prevents this message from ever being delivered regardless of maxDeliverCount.
This is a NOOP for standard NATS messages.
override string NATS.Client.Msg.ToString | ( | ) |
Generates a string representation of the messages.
|
get |
The number of bytes the server counts for the message when calculating byte counts. Only applies to JetStream messages received from the server.
|
getset |
Gets or sets the payload of the message.
This copies application data into the message. See AssignData to directly pass the bytes buffer.
|
get |
Checks if a message is from Jetstream or is a standard message.
|
get |
the last ack that was done with this message, or null if there has not been an ack