Currently, I am trying to use STOMP with websockets using webflux. In order to send a message to a STOMP topic, I need to use SimpMessagingTemplate
, which is contributed by spring boot auto configuration when I add @EnableWebSocketMessageBroker
But the problem with this is, @EnableWebSocketMessageBroker
indirectly expects me to have spring-mvc
library in classpath
@EnableWebSocketMessageBroker
@Import
s DelegatingWebSocketMessageBrokerConfiguration
which extends WebSocketMessageBrokerConfigurationSupport
& WebSocketMessageBrokerConfigurationSupport#stompWebSocketHandlerMapping
method expects the class HandlerMapping
to be returned
My question is
WebSocket Support. This part of the reference documentation covers Spring Framework's support for WebSocket-style messaging in web applications including use of STOMP as an application level WebSocket sub-protocol.
In the Web browser with a custom WebSocket By default, stomp. js will use the Web browser native WebSocket class to create the WebSocket. However it is possible to use other type of WebSockets by using the Stomp.
STOMP, an acronym for Simple Text Oriented Messaging Protocol, is a simple HTTP-like protocol for interacting with any STOMP message broker. Any STOMP client can interact with the message broker and be interoperable among languages and platforms.
One of them, supported by the Spring Framework, is STOMP. STOMP is a simple text-based messaging protocol that was initially created for scripting languages such as Ruby, Python, and Perl to connect to enterprise message brokers.
If you search for "stomp webflux" on Google, the very first hit (for me) is an issue in the Spring Boot issue tracker that shortly describes why it isn't supported:
There is a general intent to provide higher-level, messaging support aligned with WebFlux, but there is no specific target release yet. Note that we are researching gRPC and RSocket support, which are in the same general category.
Support for RSocket has been started in the 5.2
line so you may want to have a look to that.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With