qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Sim <g...@redhat.com>
Subject Re: Specify key for LVQ?
Date Mon, 15 Aug 2011 11:42:26 GMT
On 08/15/2011 12:34 PM, Toralf Lund wrote:
> I'm looking into the LVQ behaviour for QPid messaging setup. The typical
> example usage example (in C++) for this is something like:
>
> Message request;
>
> std::string key;
> args.getLVQKey(key);
> request.getHeaders().setString(key, "key1");
> request.setData("something");
> ...
>
> That's all very well for some uses, I suppose, but where does the key
> actually come from? I can't find a way to set it via the C++ APIs, or by
> using something like qpid-config. So, is the "LVQ key" some magic
> property set internally? Isn't it supposed to be possible request "LVQ
> behaviour" for any key according to AMQP?
>
> I think (in my application) I would prefer not having the sender set an
> "LVQ key" as such, but instead just set one or more general "id"
> properties, and let messaging config external to the application decide
> if a queue is an LVQ, and if it is, which property to use when deciding
> if messages are to be considered the same.

You can specify the property to use as the key when creating the queue 
by naming it as the value for 'qpid.last_value_queue_key' in the 
arguments to the declare.

This was first available from the 0.10 release in the c++ broker, and is 
now the only argument needed to enable LVQ behaviour. Prior to that the 
broker hardcoded this to 'qpid.LVQ_key'. The 0.10 release also made the 
previous modes irrelevant (you no longer have to choose between 
intuitive behaviour for browsers and correct consolidation of queue state).

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:users-subscribe@qpid.apache.org


Mime
View raw message