...
The C++ Broker M4 or later supports the following additional Queue constraints.
...
Table of Contents |
---|
Applying Queue Sizing Constraints
...
A fully worked LVQ Example can be found here
Setting additional behaviors
...
Persist Last Node
This option is used in conjunction with clustering. It allows for a queue configured with this option to persist transient messages if the cluster fails down to the last node. If additional nodes in the cluster are restored it will stop persisting transient messages.
...
Code Block |
---|
#include "qpid/client/QueueOptions.h"
QueueOptions qo;
qo.clearPersistLastNode();
session.queueDeclare(arg::queue=queue, arg::durable=true, arg::arguments=qo);
|
Queue event generation
This option is used to determine whether enqueue/dequeue events representing changes made to queue state are generated. These events can then be processed by plugins such as that used for queue state replication.
Example:
Code Block |
---|
#include "qpid/client/QueueOptions.h" QueueOptions options; options.enableQueueEvents(1); session.queueDeclare(arg::queue="my-queue", arg::arguments=options); |
The boolean option indicates whether only enqueue events should be generated. The key set by this is 'qpid.queue_event_generation' and the value is and integer value of 1 (to replicate only enqueue events) or 2 (to replicate both enqueue and dequeue events).
Other Clients
Note that these options can be set from any client. QueueOptions just correctly formats the arguments passed to the QueueDeclare() method.