[ 
https://issues.apache.org/jira/browse/ARTEMIS-1578?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Johan updated ARTEMIS-1578:
---------------------------
    Description: 
It is not possible to use the "user-id" property specified in 
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties
 for message selection in a subscription. Instead one has to use the JMS 
specific "JMSXUserID" property name.

This could be maybe fixed by changing the line 
https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L912
 to

{code:java}
} else if (key.equals(MessageUtil.JMSXUSERID) || key.equals("user-id") {
{code}

but is also prevented by the 
org.apache.activemq.artemis.selector.impl.SelectorParser which interprets 
"user-id" as an arethmetic operations.

It is also not possible to use the "userId" property instead - which is used as 
key in the HashMap 
[AMQPMessage#_properties|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L88]
 - because 
[AMQPMessage#getObjectProperty|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L919]
 only resolves values from the [application 
properties|http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties]
 of an AMQP message.

  was:
It is not possible to use the "user-id" property specified in 
http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties
 for message selection in a subscription. Instead one has to use the JMS 
specific "JMSXUserID" property name.

This could be maybe fixed by changing the line 
https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L912
 to

{code:java}
} else if (key.equals(MessageUtil.JMSXUSERID) || key.equals("user-id") {
{code}

but is also prevented by the 
org.apache.activemq.artemis.selector.impl.SelectorParser which interprets 
"user-id" as an arethmetic operations.

It is also not possible to use the "userId" property instead - which is used as 
key in the HashMap 
[AMQPMessage#_properties|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L88]
 - because 
[AMQPMessage#getObjectProperty|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L919]
 only resolves values from the application properties of an AMQP message.


> Cannot use "user-id" property in AMQP message selector
> ------------------------------------------------------
>
>                 Key: ARTEMIS-1578
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1578
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: AMQP
>    Affects Versions: 2.4.0
>            Reporter: Johan
>            Priority: Minor
>
> It is not possible to use the "user-id" property specified in 
> http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-properties
>  for message selection in a subscription. Instead one has to use the JMS 
> specific "JMSXUserID" property name.
> This could be maybe fixed by changing the line 
> https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L912
>  to
> {code:java}
> } else if (key.equals(MessageUtil.JMSXUSERID) || key.equals("user-id") {
> {code}
> but is also prevented by the 
> org.apache.activemq.artemis.selector.impl.SelectorParser which interprets 
> "user-id" as an arethmetic operations.
> It is also not possible to use the "userId" property instead - which is used 
> as key in the HashMap 
> [AMQPMessage#_properties|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L88]
>  - because 
> [AMQPMessage#getObjectProperty|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L919]
>  only resolves values from the [application 
> properties|http://docs.oasis-open.org/amqp/core/v1.0/os/amqp-core-messaging-v1.0-os.html#type-application-properties]
>  of an AMQP message.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to