[
https://issues.apache.org/jira/browse/AMQ-3355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14593375#comment-14593375
]
Alexey Adamov commented on AMQ-3355:
------------------------------------
It may be unclear, but in order to use selectors from stomp client, you need
use jms header keys, not the stomp ones.
For instance, if you want to get the messages with proper correlation id, you
should use "JMSCorrelationID", not the "correlation-id".
Like this:
$selector = ['selector' => "JMSCorrelationID = '$correlation_id'"];
$stomp->subscribe($queue, $selector);
> Selectors on message properties with a hyphen in the name don't work with
> STOMP
> -------------------------------------------------------------------------------
>
> Key: AMQ-3355
> URL: https://issues.apache.org/jira/browse/AMQ-3355
> Project: ActiveMQ
> Issue Type: Bug
> Components: Selector
> Affects Versions: 5.5.0
> Reporter: Andrew Gasparovic
>
> Setting a selector like "testheader='value'" and sending a message with the
> appropriate testheader property results in the client receiving the message.
> But when setting a selector like "Test-Header='value'" and sending the
> appropriate message, the client doesn't receive the message.
> I tried quoting the property name like "'Test-Header'='value'" to no avail.
> Quoting it the real SQL 92 way "\"Test-Header\"='value'" (where objects are
> in double quotes and values are in single quotes) results in a parser
> exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)