Spring 4.2.x, Spring Boot and the Stomp broker relay

Be aware of additional dependencies you’ll need
November 17, 2015 by Michael

If you’re using a StompBrokerRelay on the MessageBrokerRegistry, be careful with your dependencies:

If you’re using Spring Boot 1.2.x, you must have

<dependency>		
    <groupId>org.projectreactor</groupId>		
    <artifactId>reactor-net</artifactId>		
</dependency>

on the classpath, in case of Spring Boot 1.3.x, which depends on Spring 4.2 which depends on Reactor 2, it must be

<dependency>
    <groupId>io.projectreactor</groupId>
    <artifactId>reactor-net</artifactId>        
</dependency>   
<dependency>
    <groupId>io.netty</groupId>
    <artifactId>netty-all</artifactId>
    <version>4.0.31.Final</version>
</dependency>

in addition to org.springframework:spring-messaging respectively org.springframework.boot:spring-boot-starter-websocket otherwise you’ll end with a bunch of missing class exceptions: reactor.io.encoding.Codec in case of 1.2 and reactor.o.codec.Codec in case of 1.3.

I find this pretty inconvenient and i wish the web socket starter would include them.

Edit: Andy was so kind opening an issue for that topic: https://github.com/spring-projects/spring-boot/issues/4522. Stomp Starter would be equally useful.

No comments yet

Post a Comment

Your email is never published. We need your name and email address only for verifying a legitimate comment. For more information, a copy of your saved data or a request to delete any data under this address, please send a short notice to michael@simons.ac from the address you used to comment on this entry.
By entering and submitting a comment, wether with or without name or email address, you'll agree that all data you have entered including your IP address will be checked and stored for a limited time by Automattic Inc., 60 29th Street #343, San Francisco, CA 94110-4929, USA. only for the purpose of avoiding spam. You can deny further storage of your data by sending an email to support@wordpress.com, with subject “Deletion of Data stored by Akismet”.
Required fields are marked *