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
2
votes
0 answers

Is there any way to expire spring websocket connections after a certain time?

We are using JWT token to authenticate the WebSocket Connect request by intercepting it in ChannelInterceptor. But I could not find any way to specify the duration after which the WebSocket connection should expire based on the expiration of the JWT…
2
votes
1 answer

Map in ActiveMQ ObjectMessage throws ClassCastException: cannot assign instance of java.util.CollSer?

I'm using JMS ObjectMessage with ActiveMQ to transfer serializable POJOs in their setObject() function. On my client: ObjectMessage omsg = getSession().createObjectMessage(); omsg.setObject(objectToSend); The objectToSend is a POJO containing a…
Tinus Tate
  • 2,237
  • 2
  • 12
  • 33
2
votes
0 answers

Spring MessageSource.getMessage with arguments containing International characters showing up as ISO-8859 encoded characters

I am using Spring Message with placeholders to create an email message. The arguments for the placeholders contain International Characters. Once the email body text is set using the getMessage() method with message, arguments and Locale and email…
Vignesh
  • 21
  • 1
2
votes
2 answers

How do I deserialize a kafka message to a POJO?

I am having issues trying to deserialize a Kafka message to a POJO using Spring Kafka. I want to use the key and value parts of the message to construct the POJO. The Kafka message key is a string and the message value is JSON. I've tried doing just…
gl3h
  • 23
  • 1
  • 1
  • 4
2
votes
1 answer

How can I route messages in Spring Integration, which an exception was thrown during processing?

I have the following Integration Flow: Integration Flow If an exception is thrown during the second split method, inside the parser, I would like to channel that message to an error channel, is that possible somehow?
2
votes
0 answers

Is there a way to use spring message brokers without Stompendpoints?

We have a use case to create websocket server. Mobile clients will connect to this websocket server. However mobile clients doesn't support stomp. We would like to create a Java websocket server. spring does support websockets but it's heavily…
2
votes
1 answer

Error handling while using STOMP simple broker

I am creating simple STOMP broker using @EnableWebSocketMessageBroker. When RuntimeException happens in @MessageMapping method I would like to receive STOMP ERROR frame, but it doesn't work like that by default. It seems that ERROR frame is not…
ctomek
  • 1,696
  • 16
  • 35
2
votes
0 answers

Spring WebSocketStompClient: how to deserialize STOMP message payload to generic type

Looking for a best way to deserialize STOMP messages payload to generic types. I have websocket service which receives entity, saves it and sends message wrapping saved entity to all subscribed clients. In plain JSON it should looks like…
mittah
  • 41
  • 6
2
votes
1 answer

Spring Cloud Stream GCP How to do Re-queue Failed Messages

According to the docs here the currently supported binders (Rabbit and Kafka) rely on RetryTemplate. And for the GCP? Detail of my project Spring Boot Version 2.1.3.RELEASE Dependency pom.xml
2
votes
1 answer

Spring Cloud Stream @StreamListener Custom MappingJackson2MesageConverter

I have a custom ObjectMapper configured within my application which has custom modules for deserializing immutable types provided by Guava in Jackson. My problem is that I cannot seem to override the objectMapper use by @StreamListener such that it…
2
votes
1 answer

Spring cloud aws dependency effect on property injection

I want to connect AWS with using spring cloud. This is a piece of myconfig class : @EnableSqs public class AwsCloudConfig { @Value("${cloud.aws.region}") private String region; @Value("${cloud.aws.profile}") private String…
sam
  • 1,073
  • 4
  • 13
  • 27
2
votes
1 answer

Spring JMS messaging with JmsListener - how it scales?

I'm trying to use Spring JMS messaging with @JmsListener in a scalable way, but I'm not seeing it happening. I have a ConnectionFactory bean that returns a factory that connects to an Oracle Advanced Queue through JMS and a database DataSource…
2
votes
1 answer

Custom MessageConverter with Spring JmsMessagingTemplate is not working as I expected

I'm trying to attach a custom message converter that implements org.springframework.jms.support.converter.MessageConverter, to a JmsMessagingTemplate. I've read somewhere that we can attach the message converter to a MessagingMessageConverter by…
JCB
  • 341
  • 5
  • 18
2
votes
1 answer

application can't start if add implementation of AbstractSecurityWebSocketMessageBrokerConfigurer in context

I try to add websocket authorization for my application. I have following authorization related classes: @EnableWebSecurity @EnableGlobalMethodSecurity(prePostEnabled = true) public class WebSecurityConfig extends WebSecurityConfigurerAdapter { …
2
votes
1 answer

User destinations in a multi-server environment? (Spring WebSocket and RabbitMQ)

The documentation for Spring WebSockets states: 4.4.13. User Destinations An application can send messages targeting a specific user, and Spring’s STOMP support recognizes destinations prefixed with "/user/" for this purpose. For example, a client…
Andy
  • 21
  • 4