On 27 April 2012 10:59, Rob Godfrey <[email protected]> wrote:
> OK - I've looked this morning and I am also seeing an issue with
> pulling back based on JMSMessageID - but this may be my error -I've
> not looked closely yet.
>

OK - the issue with JMSMessageID is that getJMSMessageID() returns a
String which is prefixed "ID:" but the broker does not get this
part... thus we need to strip it off before creating the selector.  As
Gordon earlier pointed out you also need to quote the id, else it gets
treated as an identifier...

thus my code for setting up the selector looks like this:

String selector = "JMSMessageID = '" + msg.getJMSMessageID().substring(3) + "'";

With the selector set up like this my test works fine.

-- Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to