On 6 August 2010 20:15, Tim Chen <[email protected]> wrote:
> Hi all,
>
> I'm trying to play with last value queue. I see that there isn't any
> development release for 0.7, so I grabbed trunk from git and tried to do the
> following:
>
>   Map arguments = new HashMap<String, Object>();
>                            arguments.put("qpid.last_value_queue",true);
>
>  arguments.put("qpid.last_value_queue_key","LVQ.key");
>
>                        AMQShortString name = new AMQShortString(_queueName);
>                        session.createQueue( name, true, true, false,
> arguments );
>
> To create the LVQ. And if I don't set the key on the messages, it seems to
> be able to send messages correctly.
>
> However, once I set the key on the message:
>
> message.setStringProperty( "LVQ.key", key );
>
> Messages won't be delieverd to the queue at all, from looking at the JMX
> console.
>
> I wonder how do I make it work?
>
> Thanks,
>
> Tim

Hi Tim,

from the above description (and mention of JMX console) I'm assuming
you're trying to use the LVQ on the Java Broker (the C++ Broker also
has an implementation of LVQ, but it doesn't work in quite the same
way).

>From the above, and the fact that you see something "different" happen
when you send a message with the key set, it sounds like you have set
the queue up correctly... What are you seeing on the JMX console that
makes you think it is not being delivered?  Do you have an consumers
on the queue to which the messages are being sent?

More generally what is your use case for the LVQ - are you wanting to
use it as a "queue" where at most one client will see any message sent
to it, or are you looking for more topic like behaviour (where each
client listening to the queue will see updates)?

Cheers,
Rob

>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:[email protected]
>
>

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to