Questions tagged [spring-messaging]

A Spring Framework module providing APIs and base classes for messaging.

Spring Messaging is a module of the Spring Framework () providing APIs and fundamental classes for other Spring messaging projects such as and .

258 questions
49
votes
5 answers

Does Spring @SubscribeMapping really subscribe the client to some topic?

I am using Spring Websocket with STOMP, Simple Message Broker. In my @Controller I use method-level @SubscribeMapping, which should subscribe the client to a topic so that the client would receive the messages of that topic afterwards. Let say, the…
Mert Mertce
  • 1,614
  • 3
  • 21
  • 32
20
votes
4 answers

Could not autowire. No beans of SimpMessagingTemplate type found

I am configuring Websockets in Spring basically by following the guide provided in the documentation. I am currently trying to send a message from the server to the client as explained in the section "Sending messages from anywhere" Following the…
Tk421
  • 6,196
  • 6
  • 38
  • 47
17
votes
1 answer

Spring Security with WebSockets - Forbidden 403

I have implemented WebSocket in Spring. Everything worked fine, but recently I decided to implement Spring Security. My MessageBroker looks like : @Configuration @EnableWebSocketMessageBroker @Component("messageBroker") public class MessageBroker…
17
votes
5 answers

Spring Websockets @SendToUser without login?

I have a simple spring application with websocket functionality and everything works so far. Now I want to send a message from my server to a specific client using the @SendToUser annotation. This gives me the error "Ignoring message, no principal…
16
votes
1 answer

How to send ERROR message to STOMP clients with Spring WebSocket?

I am using Spring's STOMP over WebSocket implementation with a full-featured ActiveMQ broker. When users SUBSCRIBE to a topic, there is some permissions logic that they must pass through before being successfully subscribed. I am using a…
hartz89
  • 669
  • 1
  • 6
  • 18
16
votes
2 answers

How to get/set the principal and session attributes from Spring 4 stomp websocket methods

I'm doing experiments with Spring 4 websockets and stomp, and I have a hard time figuring out how to get/set the current user and other session attributes in a message handling method annotated with @MessageMapping. The documentation says that the…
JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
14
votes
1 answer

Prevent spring-cloud-aws-messaging from trying to stop the queue

I'm using spring-cloud-aws-messaging in a Spring Boot project. I have SQS queue created manually in AWS. It is being used like: @SqsListener("${sqs.name.incoming}") public void listen(String message) { ... } It works fine. But when I stop my…
Kartik
  • 7,677
  • 4
  • 28
  • 50
9
votes
2 answers

Spring-Cloud-AWS vs AWS-SDK-Java 2

Ours is a Spring-Boot based application. For integration with AWS SNS and SQS, we have couple of options: Use Spring-Cloud-AWS Use AWS-SDK-Java 2 I wanted to know if there is any advantage in using one or the other. When I ask AWS guys, they tell…
9
votes
2 answers

How to globally handle Spring WebSockets/Spring Messaging exception?

Question Is there a way to globally handle Spring Messaging MessageDeliveryException caused by error (usualy insufficient authorities) in Spring WebSocket module? Use case I have implemented Spring WebSockets over STOMP to support ws connection in…
Plebejusz
  • 3,332
  • 2
  • 19
  • 26
9
votes
1 answer

Spring WebSocket MessageMapping not working

I need to write chat. But I have a problem, I can't trigger MessageMapping controller. App contains of 2 parts, front-end which runs on 4200 port and back-end which is running on 8080 port. I have set all the configuration, but @MessageMapping…
9
votes
0 answers

Spring security websocket and HTTP authentication/authorization

Summary I would like to implement websocket communication over STOMP. Authenticate The user in the time of the first (HTTP request) websocket handshake and use this Principal for authorizing websocket messages later. Problem The system…
8
votes
2 answers

Why is SimpUserRegistry not working properly on EC2 Instance

I am using SimpUserRegistry to get online user-count (with getUserCount()). And it is working good on my local machines but not on AWS EC2 instances (tried with Amazon Linux and Ubuntu) with just elastic IP and no load balancer. The problem on EC2…
Bhesh Gurung
  • 50,430
  • 22
  • 93
  • 142
8
votes
1 answer

How to close a STOMP websocket in a spring server

I am using spring-websocket and spring-messaging (version 4.2.2.RELEASE) to implement STOMP over websockets with a fully-featured broker (Apache ActiveMQ 5.10.0). My clients are meant to SUBSCRIBE to destinations only - that is they should should…
Nenad
  • 257
  • 3
  • 9
7
votes
3 answers

NoClassDefFoundError: DefaultLifecycleProcessor$1 when undeplying spring-messaging application

I have a Spring application running on Tomcat 7. After adding WebSockets I started to see the following errors in the logs during undeployment. Other then the logs and increased time of undeployment (it waits for a timeout), it all works…
TMG
  • 2,620
  • 1
  • 17
  • 40
7
votes
2 answers

Check auth while sending a message to a specific user by using STOMP and WebSocket in Spring

I'm developing a realtime notification system in Spring 4 by using a build-in Message Broker, and STOMP over WebSocket. I would like to be able to send messages to a specific user, according with his username. In order to achieve this goal, I'm…
vdenotaris
  • 13,297
  • 26
  • 81
  • 132
1
2 3
17 18