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
1
vote
1 answer

How can I using ConcurrentWebSocketSessionDecorator to send my message with websocket

I have a concurrent issue, my WebSocket was used spring-message, when my chatroom has a lot of people it will very slow. So I try to find how, and I found some problem where the WebSocketSession using sendMessage, it has a synchronized in class…
石荒人
  • 753
  • 1
  • 6
  • 11
1
vote
0 answers

If using Spring MVC, how to move from request-response design to publish-subscribe architecture?

My question raised because I have read some online resources, that claimed that Event-Driven Architecture seems better then using REST https://solace.com/blog/experience-awesomeness-event-driven-microservices/ So I try to re-design my Rest based…
DavidH
  • 11
  • 1
1
vote
1 answer

Getting java.lang.noclassdeffounderror: org.springframework/amqp/core/corelation

My spring_boot_version is '2.0.5.RELEASE',spring_version = '4.3.8.RELEASE' and the spring dependencies that i am using running for rabbit mq is: compile("org.springframework.boot:spring-boot-starter-websocket:$spring_boot_version") { …
viraj
  • 129
  • 9
1
vote
0 answers

SimpMessageHeaderAccessor#getUser is nullable after upgrade to spring-boot-2. How to handle?

Source code under question: @Configuration public class PresenceEventListener { @EventListener public void handleSessionConnected(SessionConnectEvent event) { SimpMessageHeaderAccessor headers =…
1
vote
0 answers

Spring WebSocket and serving session scoped attributes

I am using Spring MVC for handling users' requests. Each user has its own 'storage' hidden behind session scoped component. The problem I am trying to solve right now is how to serve those session scoped data to correct users while communicating…
1
vote
2 answers

Understanding spring cloud messaging with rabbitmq

I think I have a problem understanding spring cloud messaging and can't find an answer to a "problem" I'm facing. I have the following setup (using spring-boot 2.0.3.RELEASE). application.yml spring: rabbitmq: host: localhost port:…
baao
  • 71,625
  • 17
  • 143
  • 203
1
vote
4 answers

Spring Boot @EnableAutoConfiguration exclude a class conditionally based on a property

Is it possible to exclude a class from auto-configuration based on the value of a property? In my case I want to disable, MailSenderAutoConfiguration in some case. For example, say I have this property app.email.disabled=true in my…
akuma8
  • 4,160
  • 5
  • 46
  • 82
1
vote
1 answer

Get bytes of message in @MessageExceptionHandler

I have a typical Spring endpoint that serves as a Websocket topic to send messages to (as can be seen in examples at Sending Error message in Spring websockets). For handling malformed messages that can not be parsed I have created…
onkami
  • 8,791
  • 17
  • 90
  • 176
1
vote
1 answer

Defining BackoffStrategy for SQS in AWS

I want to setup a backoff strategy for sqs in Spring application. What I did is : @Bean public ConnectionFactory sqsConnectionFactory() { PredefinedBackoffStrategies.ExponentialBackoffStrategy backoffStrategy = new…
1
vote
1 answer

Executing messages in same sequence after getting the messages from sqs fifo queue

I am defining a message listener similar to what is defined below. The messages are query statements. The messages are pushed in a sequence into the queue so that it doesn't violate any foreign key rules when pushed to the tables. When I set the…
1
vote
1 answer

Spring Integration message polling

I have a Spring configuration setup for polling messages from a db queue:
Peter
  • 15
  • 2
1
vote
1 answer

Spring TCP messaging server with whitelist address

I am using Spring Integration's TcpNetServerConnectionFactory and TcpInboundGateway to receive TCP messages. Everything is working as expected, but I was wondering if there is any way to implement address whitelisting? (Basically I want to allow a…
1
vote
2 answers

How get channel object from spring cloud stream in my test

I had defined a TestChannel Interface bellow public interface TestChannel { String CHANNEL_NAME = "test.channel"; @Input(value = CHANNEL_NAME) SubscribableChannel channel(); } And i try to autowired this channel in test. …
1
vote
3 answers

Sending messages with Spring Messaging (Websockets) from a RabbitMQ Listener class

Is it possible to send messages with SimpMessageSendingOperations from a RabbitMQ listener bean? I have the following listener class: public class MyJobListener { @Autowired public SimpMessageSendingOperations messagingTemplate; …
Andrés
  • 119
  • 1
  • 7
1
vote
1 answer

LazyInitializationException with Spring Messaging and GsonMessageConverter

I'm using Spring Boot with Spring Messaging and Gson for websocket connection and sending messages to client. Now I'm facing LazyInitializationException error after adding new field to my model and sending it to client. Here's my model…
user3626048
  • 706
  • 4
  • 19
  • 52