-
Couldn't load subscription status.
- Fork 38.8k
Description
Rossen Stoyanchev opened SPR-11660 and commented
At present STOMP destinations are mapped to @MessageMapping methods with Ant-style patterns. Likewise the simple message broker supports Ant-style patterns style destinations.
This is okay since in STOMP destination are opaque and brokers are free to define the exact semantics. Ant style patterns are an attractive choice for web development due to their similarity to URL paths.
In messaging however "." is more commonly used as a separator and may be a more fitting choice. This ticket is to explore the possibility of using "." instead of "/" as separator. The AntPathMatcher does support using another separator char, so it might even be trivial to switch the style for message mapping purposes.
As for wildcard support it can differ across brokers. A wildcard is commonly used for matching one segment. Recursive matching however varies, e.g. # (hash) in AMQP, ** in Apollo, > in ActiveMQ. It may be relatively easy to make AntPatcher configurable with regards to what it uses for recursive matching. That would make it possible for the simple broker to support all of those and therefore make it easier to switch from the simple broker to a full featured broker.
The configuration could expose this centrally, e.g. default separator, single match and recursive match characters.
Affects: 4.0.3
Sub-tasks:
- Improve documentation for using "." vs "/" as separators with STOMP/WebSocket messaging [SPR-12007] #16623 Improve documentation for using "." vs "/" as separators with STOMP/WebSocket messaging
Referenced from: commits spring-attic/spring-framework-issues@3297657, spring-attic/spring-framework-issues@aeed125
1 votes, 3 watchers