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

A client uses an IMessageConsumer object to receive messages from a destination. More...

Inheritance diagram for IMessageConsumer:
ITopicSubscriber

Public Member Functions

string GetMessageSelector ()
 Gets this message consumer's message selector expression.
IMessage Receive ()
 Receives the next message produced for this message consumer.
IMessage Receive (const Integer Timeout)
 Receives the next message that arrives within the specified timeout interval.
IMessage ReceiveNoWait ()
 Receives the next message if one is immediately available.
 Close ()
 Closes the message consumer.

Detailed Description

A client uses an IMessageConsumer object to receive messages from a destination.

An IMessageConsumer object is created by passing an IDestination object to a message-consumer creation method supplied by a session.

IMessageConsumer is the parent interface for all message consumers.

A message consumer can be created with a message selector. A message selector allows the client to restrict the messages delivered to the message consumer to those that match the selector.

For synchronous receipt, a client can request the next message from a message consumer using one of its receive methods. There are several variations of receive that allow a client to poll or wait for the next message.

Member Function Documentation

◆ Close()

IMessageConsumer::Close ( )

Closes the message consumer.

Since a provider may allocate some resources on behalf of a MessageConsumer, clients should close them when they are not needed.

Exceptions
EMQException

◆ GetMessageSelector()

string IMessageConsumer::GetMessageSelector ( )

Gets this message consumer's message selector expression.

◆ Receive() [1/2]

IMessage IMessageConsumer::Receive ( )

Receives the next message produced for this message consumer.

◆ Receive() [2/2]

IMessage IMessageConsumer::Receive ( const Integer Timeout)

Receives the next message that arrives within the specified timeout interval.

◆ ReceiveNoWait()

IMessage IMessageConsumer::ReceiveNoWait ( )

Receives the next message if one is immediately available.