Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
6.6.2. Declaring a Last Value Queue
Last Value Queues are created by supplying a
qpid.last_value_queue_key
when creating the queue.
For example, to create a last value queue called
stock-ticker
that uses stock-symbol
as the key, using qpid-config
:
qpid-config add queue stock-ticker --argument qpid.last_value_queue_key=stock-symbol
qpid-config add queue stock-ticker --argument qpid.last_value_queue_key=stock-symbol
To create the same queue in an application:
- Python
myLastValueQueue = mySession.sender("stock-ticker;{create:always, node:{type:queue, x-declare:{arguments:{'qpid.last_value_queue_key': 'stock-symbol'}}}}")
myLastValueQueue = mySession.sender("stock-ticker;{create:always, node:{type:queue, x-declare:{arguments:{'qpid.last_value_queue_key': 'stock-symbol'}}}}")
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Both string and integer values can be provide as the last value. Using the example queue created above, valid values for the stock-symbol key would include "
RHT
", "JAVA
", and other string values; and also 3
, 15
, and other integer values.