[
https://issues.apache.org/jira/browse/ARTEMIS-5576?focusedWorklogId=979021&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-979021
]
ASF GitHub Bot logged work on ARTEMIS-5576:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 15/Aug/25 14:01
Start Date: 15/Aug/25 14:01
Worklog Time Spent: 10m
Work Description: mbengtsson opened a new pull request, #5874:
URL: https://github.com/apache/activemq-artemis/pull/5874
Centralize and unify address translation for producers/consumers to preserve
'\' in names and avoid mismatches. Keeps temp/advisory/FQQN/ VirtualTopic
behavior unchanged and adds tests for all cases.
Changes include:
- Replace ad-hoc wildcard and escape handling in AMQSession, AMQConsumer,
and OpenWireConnection with central OpenWireUtil methods.
- Preserve temp/advisory destinations, FQQN structure, and VirtualTopic
consumer naming conventions.
- Strip matching queue:// or topic:// scheme prefixes only when type
matches.
- Add unit and integration tests covering escape rules, wildcard conversion,
FQQN handling, and advisory/temp queue cases.
- Remove obsolete AMQSession.convertWildcard().
I think this change is 100% backward compatible and requires no client
changes.
Issue Time Tracking
-------------------
Worklog Id: (was: 979021)
Remaining Estimate: 0h
Time Spent: 10m
> Backslash in the JMS destination name with OpenWire
> ---------------------------------------------------
>
> 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
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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