I have a process that runs and polls for a message in an ActiveMQ. Now I have problems with setting up the message selector. The Queue is connected and pulls messages from the Queue, without selector.
If I add an selector, it just breaks with a exception that only contains the selector string.
As much as I read the thin documentation I don't really get the problem, I played with masking the string and played with the format, but no luck.
The Message in the Queue has the following property/value pair as one of its properties, as I can see the message in the webpanel in the queue:
F_IMGKOMP.PIMG_SOURCE_FILENAME = EURDE_500.jpeg
The reduced code looks like this:
var selector = "F_IMGKOMP.PIMG_SOURCE_FILENAME = 'EURDE_500.jpeg'";
using (IMessageConsumer myCons = mySession.CreateConsumer(myDest, selector ))
{
var tmp = myCons.Receive(new TimeSpan(0, 0, 10));
if (tmp != null)
System.Diagnostics.Debug.WriteLine("eureka");
}
Your selector string is invalid which is why you get the error about the selector. The selector syntax is SQL 92.
The identifier must obey the following rule:
This implies that the use of the '.' in your selector property identifier is the culprit.