Show Table of Contents
4.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
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'}}}}")
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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.