#include <LocalQueue.h>
Public Member Functions | |
LocalQueue (AckPolicy ackPolicy=AckPolicy()) | |
Create a local queue. | |
bool | get (Message &result, sys::Duration timeout=0) |
Wait up to timeout for the next message from the local queue. | |
Message | get () |
Get the next message off the local queue, or wait for a message from the broker queue. | |
Message | pop () |
Synonym for get(). | |
bool | empty () const |
Return true if local queue is empty. | |
size_t | size () const |
Number of messages on the local queue. | |
void | setAckPolicy (AckPolicy) |
Set the message acknowledgement policy. | |
AckPolicy & | getAckPolicy () |
Get the message acknowledgement policy. |
Create a queue and subscribe it using the SubscriptionManager. Messages from the remote queue on the broker will be stored in the local queue until you retrieve them.
Definition at line 41 of file LocalQueue.h.
Create a local queue.
Subscribe the local queue to a remote broker queue with a SubscriptionManager.
LocalQueue is an alternative to implementing a MessageListener.
ackPolicy | Policy for acknowledging messages. |
bool qpid::client::LocalQueue::get | ( | Message & | result, | |
sys::Duration | timeout = 0 | |||
) |
Wait up to timeout for the next message from the local queue.
result | Set to the message from the queue. | |
timeout | wait up this timeout for a message to appear. |
Message qpid::client::LocalQueue::get | ( | ) |
Get the next message off the local queue, or wait for a message from the broker queue.
ClosedException | if subscription has been closed. |
bool qpid::client::LocalQueue::empty | ( | ) | const |
Return true if local queue is empty.
void qpid::client::LocalQueue::setAckPolicy | ( | AckPolicy | ) |
AckPolicy& qpid::client::LocalQueue::getAckPolicy | ( | ) |