[
https://issues.apache.org/jira/browse/ARTEMIS-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Justin Bertram updated ARTEMIS-5576:
------------------------------------
Description:
Using the 2.31.0 version over OpenWire a consumer subscribes to a queue having
{{\}} in the name e.g {{{}foo\foo{}}}. According to the web console, this
internally generates the {{foo\\foo}} address and queue name. When a producer
send message to the {{foo\foo}} this also generates the {{foo\foo}} queue name
internally.
However, with versions 2.39.0 & 2.41.0 (the other version was not tested by me)
subscribing to {{foo\foo}} internally generates the {{foo\\\\foo}} address and
queue name, but sending message to the {{foo\foo}} sends messages to the
{{foo\\foo}} address so they can not communicate with each other. I think maybe
the problem relates to the [this
commit|https://github.com/jbertram/activemq-artemis/commit/45434e848e597a36fd97ca6faf9ccc968b5891a6#diff-9c5fa40bb8a34caf64b426b440d5c1a91f08de680a89efa344a87959fd71794c]
where
{{[WildcardConfiguration.java|https://github.com/jbertram/activemq-artemis/commit/45434e848e597a36fd97ca6faf9ccc968b5891a6#diff-9c5fa40bb8a34caf64b426b440d5c1a91f08de680a89efa344a87959fd71794c]}}
was changed. The new {{convert}} function calls {{escape}} when the already
escaped {{\}} is escaped again:
{code:java}
private String escape(final String input, WildcardConfiguration from) {
String result = input.replace(escapeString, escapeString +
escapeString);{code}
This convert function is called from the {{AMQConsumer.java}}:
{code:java}
SimpleString destinationName =
SimpleString.of(session.convertWildcard(openwireDestination));{code}
However, the message sending functions use the unescaped address because it is
not converted.
I think that this escaping {{\}} to {{\\}} is unnecessary in the convert if the
{{\}} already has been escaped earlier.
Using {{\}} in the name is not so common, but I have not find any information
that the {{\}} is not allowed in the address or queue name, that's why we
started to use the Windows domain name with {{\}} as the name.
was:
Using the 2.31.0 version over OpenWire a consumer subscibes to a queue having \
in the name e.g foo\foo. According to the web console, this internally
generates the foo\\foo address and queue name.
When a producer send message to the foo\foo this also generates the foo\foo
queue name internally.
But with version 2.39.0 2.41.0 (the other version was not tested by me) the
situation is the following:
Subscibing to the foo\foo internally generates the foo\\\\foo address and queue
name, but
sending message to the foo\foo sends messages to the foo\\foo address, so they
can not communicate with each other.
I think maybe the problem relates to the this commit
[https://github.com/jbertram/activemq-artemis/commit/45434e848e597a36fd97ca6faf9ccc968b5891a6#diff-9c5fa40bb8a34caf64b426b440d5c1a91f08de680a89efa344a87959fd71794c.]
The
*[WildcardConfiguration.java|https://github.com/jbertram/activemq-artemis/commit/45434e848e597a36fd97ca6faf9ccc968b5891a6#diff-9c5fa40bb8a34caf64b426b440d5c1a91f08de680a89efa344a87959fd71794c]*
has been changed, and the new convert function calls the escape function when
the already escaped \ escaped again:
private String escape(final String input, WildcardConfiguration from) {
String result = input.replace(escapeString, escapeString + escapeString);
This convert function is called from the AMQConsumer.java:
SimpleString destinationName =
SimpleString.of(session.convertWildcard(openwireDestination));
,but the message sending functions use the unescaped address, because it is not
converted.
I think that this escaping \ to \\ is unnecesary in the convert if the \
already has been escaped earlier.
Using \ in the name is not so common, but I have not find any information that
the \ is not allowed in the address or queue name, that's why we started to use
the Windows domain name with \ as the name.
> Backslash in the address/queue name
> ------------------------------------
>
> Key: ARTEMIS-5576
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5576
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: OpenWire
> Affects Versions: 2.39.0, 2.41.0
> Reporter: Péter Kerekes
> Priority: Major
>
> Using the 2.31.0 version over OpenWire a consumer subscribes to a queue
> having {{\}} in the name e.g {{{}foo\foo{}}}. According to the web console,
> this internally generates the {{foo\\foo}} address and queue name. When a
> producer send message to the {{foo\foo}} this also generates the {{foo\foo}}
> queue name internally.
> However, with versions 2.39.0 & 2.41.0 (the other version was not tested by
> me) subscribing to {{foo\foo}} internally generates the {{foo\\\\foo}}
> address and queue name, but sending message to the {{foo\foo}} sends messages
> to the {{foo\\foo}} address so they can not communicate with each other. I
> think maybe the problem relates to the [this
> commit|https://github.com/jbertram/activemq-artemis/commit/45434e848e597a36fd97ca6faf9ccc968b5891a6#diff-9c5fa40bb8a34caf64b426b440d5c1a91f08de680a89efa344a87959fd71794c]
> where
> {{[WildcardConfiguration.java|https://github.com/jbertram/activemq-artemis/commit/45434e848e597a36fd97ca6faf9ccc968b5891a6#diff-9c5fa40bb8a34caf64b426b440d5c1a91f08de680a89efa344a87959fd71794c]}}
> was changed. The new {{convert}} function calls {{escape}} when the already
> escaped {{\}} is escaped again:
> {code:java}
> private String escape(final String input, WildcardConfiguration from) {
> String result = input.replace(escapeString, escapeString +
> escapeString);{code}
> This convert function is called from the {{AMQConsumer.java}}:
> {code:java}
> SimpleString destinationName =
> SimpleString.of(session.convertWildcard(openwireDestination));{code}
> However, the message sending functions use the unescaped address because it
> is not converted.
> I think that this escaping {{\}} to {{\\}} is unnecessary in the convert if
> the {{\}} already has been escaped earlier.
> Using {{\}} in the name is not so common, but I have not find any information
> that the {{\}} is not allowed in the address or queue name, that's why we
> started to use the Windows domain name with {{\}} as the name.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact