Habari STOMP Client for ActiveMQ 9.4
Object Pascal STOMP client library for Apache ActiveMQ
Loading...
Searching...
No Matches
TBTMessage Class Reference

Represents a message either to be sent to a message broker or received from a message broker. More...

Inheritance diagram for TBTMessage:
IMessage TBTBytesMessage TBTMapMessage TBTObjectMessage TBTTextMessage

Public Member Functions

PMStrings GetPropertyNames ()
 Returns a list of all the property names.
string GetStringProperty (const string Key)
 Get the value of string property Key.
 SetStringProperty (const string Key, const string Value)
 Set the value of string property Key.
 TBTMessage (const TBTStompClient ATransport)
 Constructor.
 TBTMessage (const TBTStompClient ATransport, const string ASubscriptionID)
 Constructor.
 TBTMessage (const TBTStompClient ATransport, const RawByteString AContent, const string ASubscriptionID)
 Constructor.
 ~TBTMessage ()

Public Attributes

string JMSCorrelationID
IDestination JMSDestination
TDateTime JMSExpiration
TJMSDeliveryMode JMSDeliveryMode
Integer JMSPriority
Boolean JMSRedelivered
IDestination JMSReplyTo
TDateTime JMSTimestamp
string JMSMessageID
string JMSType
string TransactionID
RawByteString Content
 The message content.
string StompSubscriptionID
 required for ACK in STOMP 1.1
Public Attributes inherited from IMessage
string JMSCorrelationID
 The correlation ID for the message.
IDestination JMSDestination
 Gets the Destination object for this message.
TDateTime JMSExpiration
 The message's expiration value.
TJMSDeliveryMode JMSDeliveryMode
 Whether or not the message is persistent.
Integer JMSPriority
 The message priority level.
Boolean JMSRedelivered
 Redelivered - Returns true if this message has been redelivered to this or another consumer before being acknowledged successfully.
IDestination JMSReplyTo
 The IDestination object to which a reply to this message should be sent.
TDateTime JMSTimestamp
 The timestamp the broker added to the message.
string JMSMessageID
 The message ID which is set by the provider.
string JMSType
 The type name of this message.

Protected Member Functions

 SetNackHeaders (const TStrings Value)
string GetTransactionID ()
 SetTransactionID (const string Value)
string GetMsgID ()
RawByteString GetContent ()
 SetContent (const RawByteString Value)
 Acknowledge ()
 Acknowledges all consumed messages of the session of this consumed message.
 Nack ()
 NACK is the opposite of ACK.
Boolean GetBooleanProperty (const string Key)
 Get the value of boolean property Key.
 SetBooleanProperty (const string Key, const Boolean Value)
 Set the value of boolean property Key.
Integer GetIntProperty (const string Key)
 Get the value of int property Key.
 SetIntProperty (const string Key, const Integer Value)
 Set the value of int property Key.

Detailed Description

Represents a message either to be sent to a message broker or received from a message broker.

Constructor & Destructor Documentation

◆ TBTMessage() [1/3]

TBTMessage::TBTMessage ( const TBTStompClient ATransport)

Constructor.

◆ TBTMessage() [2/3]

TBTMessage::TBTMessage ( const TBTStompClient ATransport,
const string ASubscriptionID )

Constructor.

◆ TBTMessage() [3/3]

TBTMessage::TBTMessage ( const TBTStompClient ATransport,
const RawByteString AContent,
const string ASubscriptionID )

Constructor.

◆ ~TBTMessage()

TBTMessage::~TBTMessage ( )

Member Function Documentation

◆ Acknowledge()

TBTMessage::Acknowledge ( )
protected

Acknowledges all consumed messages of the session of this consumed message.

All consumed messages support the acknowledge method for use when a client has specified that its session's consumed messages are to be explicitly acknowledged. By invoking acknowledge on a consumed message, a client acknowledges all messages consumed by the session that the message was delivered to.

Calls to acknowledge are ignored for both transacted sessions and sessions specified to use implicit acknowledgement modes.

A client may individually acknowledge each message as it is consumed, or it may choose to acknowledge messages as an application-defined group (which is done by calling acknowledge on the last received message of the group, thereby acknowledging all messages consumed by the session.)

Messages that have been received but not acknowledged may be redelivered.

Exceptions
EMQExceptionif the provider fails to acknowledge the messages due to some internal error.
IllegalStateExceptionif this method is called on a closed session.

Implements IMessage.

◆ GetBooleanProperty()

Boolean TBTMessage::GetBooleanProperty ( const string Key)
protected

Get the value of boolean property Key.

Implements IMessage.

◆ GetContent()

RawByteString TBTMessage::GetContent ( )
protected

◆ GetIntProperty()

Integer TBTMessage::GetIntProperty ( const string Key)
protected

Get the value of int property Key.

Implements IMessage.

◆ GetMsgID()

string TBTMessage::GetMsgID ( )
protected

◆ GetPropertyNames()

PMStrings TBTMessage::GetPropertyNames ( )

Returns a list of all the property names.

Implements IMessage.

◆ GetStringProperty()

string TBTMessage::GetStringProperty ( const string Key)

Get the value of string property Key.

Implements IMessage.

◆ GetTransactionID()

string TBTMessage::GetTransactionID ( )
protected

◆ Nack()

TBTMessage::Nack ( )
protected

NACK is the opposite of ACK.

It is used to tell the server that the client did not consume the message. The server can then either send the message to a different client, discard it, or put it in a dead letter queue. The exact behavior is server specific.

Implements IMessage.

◆ SetBooleanProperty()

TBTMessage::SetBooleanProperty ( const string Key,
const Boolean Value )
protected

Set the value of boolean property Key.

Implements IMessage.

◆ SetContent()

TBTMessage::SetContent ( const RawByteString Value)
protected

◆ SetIntProperty()

TBTMessage::SetIntProperty ( const string Key,
const Integer Value )
protected

Set the value of int property Key.

Implements IMessage.

◆ SetNackHeaders()

TBTMessage::SetNackHeaders ( const TStrings Value)
protected

◆ SetStringProperty()

TBTMessage::SetStringProperty ( const string Key,
const string Value )

Set the value of string property Key.

Implements IMessage.

◆ SetTransactionID()

TBTMessage::SetTransactionID ( const string Value)
protected

Member Data Documentation

◆ Content

RawByteString TBTMessage::Content

The message content.

See also
FContent For reading

◆ JMSCorrelationID

string TBTMessage::JMSCorrelationID
See also
GetCorrelationID For reading
SetCorrelationID For writing

◆ JMSDeliveryMode

TJMSDeliveryMode TBTMessage::JMSDeliveryMode
See also
GetDeliveryMode For reading
SetDeliveryMode For writing

◆ JMSDestination

IDestination TBTMessage::JMSDestination
See also
GetDestination For reading
SetDestination For writing

◆ JMSExpiration

TDateTime TBTMessage::JMSExpiration
See also
GetExpiration For reading
SetExpiration For writing

◆ JMSMessageID

string TBTMessage::JMSMessageID
See also
GetMessageID For reading
SetMessageID For writing

◆ JMSPriority

Integer TBTMessage::JMSPriority
See also
GetPriority For reading
SetPriority For writing

◆ JMSRedelivered

Boolean TBTMessage::JMSRedelivered
See also
GetRedelivered For reading
SetRedelivered For writing

◆ JMSReplyTo

IDestination TBTMessage::JMSReplyTo
See also
GetReplyTo For reading
SetReplyTo For writing

◆ JMSTimestamp

TDateTime TBTMessage::JMSTimestamp
See also
GetTimestamp For reading
SetTimestamp For writing

◆ JMSType

string TBTMessage::JMSType
See also
GetTypeName For reading
SetTypeName For writing

◆ StompSubscriptionID

string TBTMessage::StompSubscriptionID

required for ACK in STOMP 1.1

See also
FSubscriptionID For reading

◆ TransactionID

string TBTMessage::TransactionID
See also
GetTransactionID For reading
SetTransactionID For writing