Habari STOMP Client for RabbitMQ 9.4
Object Pascal STOMP client library for RabbitMQ
Loading...
Searching...
No Matches
IConnection Interface Reference

Represents a connection with a message broker. More...

Inheritance diagram for IConnection:

Public Member Functions

 Start ()
 Starts (or restarts) a connection's delivery of incoming messages.
 Stop ()
 Temporarily stops a connection's delivery of incoming messages.
 Close ()
 Closes the connection.
ISession CreateSession (const Boolean Transacted, const TAcknowledgementMode AcknowledgementMode)
 Creates a new session to work on this connection, specifying transacted and acknowledgeMode.
ISession CreateSession (const TAcknowledgementMode AcknowledgementMode)
 Creates a new session to work on this connection, specifying acknowledgeMode.

Public Attributes

string ClientID
 The client identifier for this connection.

Detailed Description

Represents a connection with a message broker.

An IConnection object is a client's active connection to its provider.

A connection serves several purposes:

  • It encapsulates an open connection with a message provider. It typically represents an open TCP/IP socket between a client and the service provider software.
  • Its creation is where client authentication takes place.
  • It can specify a unique client identifier.

Member Function Documentation

◆ Close()

IConnection::Close ( )

Closes the connection.

Providers typically allocate significant resources for a connection. Clients should close these resources when they are no longer needed.

◆ CreateSession() [1/2]

ISession IConnection::CreateSession ( const Boolean Transacted,
const TAcknowledgementMode AcknowledgementMode )

Creates a new session to work on this connection, specifying transacted and acknowledgeMode.

Parameters
Transacted- indicates whether the session is transacted
AcknowledgementMode- indicates whether the consumer or the client will acknowledge any messages it receives.
Returns
new session

◆ CreateSession() [2/2]

ISession IConnection::CreateSession ( const TAcknowledgementMode AcknowledgementMode)

Creates a new session to work on this connection, specifying acknowledgeMode.

Parameters
AcknowledgementMode- indicates whether the consumer or the client will acknowledge any messages it receives.
Returns
new session

◆ Start()

IConnection::Start ( )

Starts (or restarts) a connection's delivery of incoming messages.

Ignored if the connection is already started.

◆ Stop()

IConnection::Stop ( )

Temporarily stops a connection's delivery of incoming messages.

Member Data Documentation

◆ ClientID

string IConnection::ClientID

The client identifier for this connection.

The purpose of the client identifier is to associate a connection and its objects with a state maintained on behalf of the client by a provider. The only such state identified by the API is that required to support durable subscriptions.

See also
GetClientId For reading
SetClientId For writing