NATS Streaming .NET Client  0.1.5
The nats.io .NET Streaming C# Client
STAN.Client.StanMsg Class Reference

Public Member Functions

 StanMsg (byte[] data, bool redelivered, string subject, long timestamp, ulong sequence, IStanSubscription subscription)
 
void Ack ()
 

Properties

long Time [get]
 
DateTime TimeStamp [get]
 
ulong Sequence [get]
 
string Subject [get]
 
byte [] Data [get]
 
bool Redelivered [get]
 
IStanSubscription Subscription [get]
 

Detailed Description

A StanMsg object is a received NATS streaming message.

Constructor & Destructor Documentation

◆ StanMsg()

STAN.Client.StanMsg.StanMsg ( byte []  data,
bool  redelivered,
string  subject,
long  timestamp,
ulong  sequence,
IStanSubscription  subscription 
)

Constructor for generating a StanMsg object. Used only for application unit testing.

Objects of this type are normally generated internally by the NATS streaming client. This constructor has been provided to facilitate application unit testing.

Parameters
dataThe message payload.
redeliveredTrue if the message may have been redelivered.
subjectSubject of the message
timestampMessage timestamp, nanoseconds since epoch (1/1/1970)
sequenceSequence number of the message.
subscriptionSubscription of the message. Must be a valid streaming subscription or null.

Member Function Documentation

◆ Ack()

void STAN.Client.StanMsg.Ack ( )

Acknowledge a message.

Property Documentation

◆ Data

byte [] STAN.Client.StanMsg.Data
get

Get the data field (payload) of a message.

◆ Redelivered

bool STAN.Client.StanMsg.Redelivered
get

The redelivered property if true if this message has been redelivered, false otherwise.

◆ Sequence

ulong STAN.Client.StanMsg.Sequence
get

Gets the sequence number of a message.

◆ Subject

string STAN.Client.StanMsg.Subject
get

Gets the subject of the message.

◆ Subscription

IStanSubscription STAN.Client.StanMsg.Subscription
get

Gets the subscription this message was received upon.

◆ Time

long STAN.Client.StanMsg.Time
get

Get the time stamp of the message represeneted as Unix nanotime.

◆ TimeStamp

DateTime STAN.Client.StanMsg.TimeStamp
get

Get the timestamp of the message.


The documentation for this class was generated from the following file: