Skip to content

DefaultUserDestinationResolver does not support "." separator convention [SPR-14044] #18616

Closed
@spring-projects-issues

Description

@spring-projects-issues

Ali Shahbour opened SPR-14044 and commented

When using Artemis as StompBrokerRelay , queue names should follow jms for example jms.queue.call.

Every thing worked fine except when trying to send message or subscribe to user queue , i subscribe to queue like this /user/jms.queue.call, it did not work and the reason is in DefaultUserDestinationResolver and specifically in:

private ParseResult parse(Message<?> message) 
.
.
int prefixEnd = this.prefix.length() - 1;
String actualDestination = destination.substring(prefixEnd);

The actualDestination is resolved as /jms.queue.call which did not work with Artemis.

Same for sending message:

int prefixEnd = this.prefix.length();
int userEnd = destination.indexOf('/', prefixEnd);
Assert.isTrue(userEnd > 0, "Expected destination pattern \"/user/{userId}/**\"");
String actualDestination = destination.substring(userEnd);
String subscribeDestination = this.prefix.substring(0, prefixEnd - 1) + actualDestination;

ActualDestination had the same extra /.

I removed these through debugging and it worked.

Shouldn't DefaultUserDestinationResolver support both . and / as delimiter ?


Affects: 4.2.5

Issue Links:

Referenced from: commits 1835942

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions