简体   繁体   中英

Spring Boot - Stomp : '.' vs '/' in Message Destination

I'm building a messaging system and I'm following a few past projects and examples to build it. However, I've noticed several developers use '.' and '/' in their message destination declaration.

I've tested in making a working model and when I change one into another, the messaging either malfunctions or give unexpected results. From breaking connecting to the rest points to making an '1 to 1' connection into 'many to many'.

I've looked through several documents trying to the answer but none even reference this.

I found the answer here

26.4.9 Using Dot as Separator in @MessageMapping Destinations

Although slash-separated path patterns are familiar to web developers, in messaging it is common to use a "." as the separator, for example in the names of topics, queues, exchanges, etc. Applications can also switch to using "." (dot) instead of "/" (slash) as the separator in @MessageMapping mappings by configuring a custom AntPathMatcher.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM