You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Sobakaa <mo...@yandex.ru> on 2016/03/09 15:06:15 UTC
Artemis does not work with Spring controllers, immediate disconnect
Hello,
I'm researching switching to WildFly 10 and, subsequently, Artemis. I've set
up a simple Spring Websocket project, as described here:
https://spring.io/guides/gs/messaging-stomp-websocket/.
The meat of the project are WebSocketConfig:
@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config.enableStompBrokerRelay("/queue/", "/topic/");
config.setApplicationDestinationPrefixes("/app");
}
And controller:
@MessageMapping("/hello")
@SendTo("/topic/greetings")
public Greeting greeting(HelloMessage message) throws Exception {
return new Greeting("Hello, " + message.getName() + "!");
}
Application works perfectly fine with ActiveMQ running, i haven't altered
it's config in any way. Knowing that Artemis requires
"auto-create-jms-queues" for that Spring mapping to work i added that line
to broker.xml.
However, despite seeing a successful connection confirmation in logs, it's
dropped almost immediately afterwards:
Connected: CONNECTED
heart-beat:10000,10000
server:ActiveMQ-Artemis/1.2.0 ActiveMQ Artemis Messaging Engine
session:-904444763
version:1.1
>>> SUBSCRIBE
id:sub-0
destination:/topic/greetings
Whoops! Lost connection to undefined
In between connecting and losing connection there's ~100 empty POST requests
to "http://localhost:8080/hello/020/uakj27sz/xhr" with "[3000,"Go away!"]"
in Response.
Can you please suggest where do i look to fix this issue? So far i'm stuck
and will be glad for any help.
--
View this message in context: http://activemq.2283324.n4.nabble.com/Artemis-does-not-work-with-Spring-controllers-immediate-disconnect-tp4709057.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.