Questions tagged [spring-jms]

Spring provides a JMS integration framework that simplifies the use of the JMS API much like Spring's integration does for the JDBC API.

JMS can be roughly divided into two areas of functionality, namely the production and consumption of messages. The JmsTemplate class is used for message production and synchronous message reception. For asynchronous reception similar to Java EE’s message-driven bean style, Spring provides a number of message listener containers that are used to create Message-Driven POJOs (MDPs).

A getting started guide is available to help understand how these concepts work with a practical example.

Useful links:

1669 questions
27
votes
4 answers

Execution of JMS message listener failed, and no ErrorHandler has been set

When I use Spring to listen to JMS messages, I receievd the above error. I am wondering how to add an Errorhandler into the JMS listener?
user705414
  • 17,800
  • 36
  • 105
  • 151
23
votes
4 answers

jms producer performance with spring

i created a simple producer consumer simulation based on spring, jms and activemq, i'm trying to reach high performance from both sides, producers and consumers, Connection settings :
Matan
  • 561
  • 2
  • 4
  • 12
20
votes
4 answers

Disabling Spring JMS Auto configuration in Spring Boot Application

In my spring boot application i configure two different instances of MQQueueConnectionFactory (different id) as it is a need of the application. For that i have added ibm client jars. I have also added spring-jms dependency in my code as i wanted…
user3534483
  • 1,753
  • 4
  • 17
  • 19
15
votes
2 answers

@JmsListener usage for publish-subscribe topic

I am trying to create example for publish-subscribe based on @JmsListener annotation: https://github.com/lkrnac/book-eiws-code-samples/tree/master/05-jms/0515-publish-subscribe Relevant code…
luboskrnac
  • 21,083
  • 9
  • 71
  • 84
14
votes
4 answers

How to set the ActiveMQ redeliveryPolicy on a queue?

How do I set the redeliveryPolicy in ActiveMQ on a Queue? 1) In the doc, see: activeMQ Redelivery, the explain that you should set it on the ConnectionFactory or Connection. But I want to use different value's for different Queue's. 2) Apart from…
edbras
  • 3,434
  • 7
  • 35
  • 66
13
votes
4 answers

spring boot configure multiple ActiveMQ instances

I have requirement to move messages from queues on one ActiveMQ instance to another ActiveMQ instance. Is there a way to connect to two different ActiveMQ instances using spring boot configuration? Do I need to create multiple connectionFactories?…
user2279337
  • 617
  • 5
  • 12
  • 26
12
votes
2 answers

Spring JmsTemplate - add custom Property

I am using the Spring API's JmsTemplate and MappingJackson2MessageConverter (version: spring-jms-4.3.4.RELEASE.jar) to publish messages to an ActiveMQ topic as shown in the below code. TopicPublisher class: @Component public class TopicPublisher…
developer
  • 19,553
  • 8
  • 40
  • 57
12
votes
1 answer

Spring JMS : Set ErrorHandler for @JmsListener annotated method

I am using a @JmsListener annotated method listen to JMS messages as shown below. @JmsListener(destination="exampleQueue") public void fetch(@Payload String message){ process(message); } When this method execution result in an exception,…
faizi
  • 1,055
  • 2
  • 10
  • 27
12
votes
3 answers

Spring 4.1 @JmsListener configuration

I would like to use the new annotations and features provided in Spring 4.1 for an application that needs a JMS listener. I've carefully read the notes in the Spring 4.1 JMS improvements post but I continue to miss the relationship between…
TemarV
  • 297
  • 1
  • 3
  • 11
11
votes
1 answer

How to implement jms queue in spring boot

I have created a Spring Boot project using initializer and I am trying to create my first message but I have no idea where to start. I am familiar with the same process using JEE so I guess I need to create a factory, a sender and a consumer. Can…
Maria Georgiou
  • 123
  • 1
  • 1
  • 5
11
votes
3 answers

How to set typeIdPropertyName in MappingJackson2MessageConverter

With Spring4 + ActiveMQ I want to receive a JMS Message from a Queue and convert to POJO automatically. I added the MappingJackson2MessageConverter to DefaultJmsListenerContainerFactory: @Bean public DefaultJmsListenerContainerFactory…
Mr.Sheng
  • 275
  • 3
  • 12
11
votes
3 answers

How can I Stop/start/Pause a @JmsListener (the clean way)

I am using Spring(boot) on my project and I access a JMS Queue (ActiveMQ) using : @JmsListener(destination = "mydestinationQueue") public void processMessage(String content) { //do something } And it works perfectly but I need to be able to…
Seb
  • 2,504
  • 7
  • 27
  • 44
11
votes
2 answers

ActiveMQ vs JMS

I am trying to understand JMS. What is the difference between ActiveMQ and JMS can pool the data from NON ActiveMQ with ActiveMQ plugin in Spring? Thanks ,In advance
StudentJava
  • 171
  • 1
  • 6
11
votes
1 answer

Why DefaultMessageListenerContainer should not use CachingConnectionFactory?

I was reading spring documentation on DefaultMessageListenerContainer It says "Note: Don't use Spring's CachingConnectionFactory in combination with dynamic scaling. Ideally, don't use it with a message listener container at all, since it is…
EmeraldTablet
  • 692
  • 3
  • 10
  • 28
10
votes
1 answer

SQS Message visibility timeout being set to 0 when exception is thrown and @JMSListener

I have a simple Spring Boot service that listens to an AWS SQS queue using JMSTemplate. Everything works as expected when the message is properly handled. I am using CLIENT_ACKNOWLEDGE so when an exception is thrown during processing, the message…
Robert P
  • 151
  • 1
  • 6
1
2 3
99 100