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:

1908 questions
31
votes
5 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
  • 20,472
  • 39
  • 112
  • 155
25
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
  • 2,133
  • 5
  • 22
  • 19
24
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
  • 581
  • 2
  • 4
  • 13
16
votes
1 answer

Can Spring actuator be used with non-web Spring Boot application?

I have a Spring Boot application which listens for messages from an IBM MQ input queue, does some processing of the messages and then puts the messages to an output queue. Can application like this utilize Spring actuator to monitor the…
16
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…
Vasu
  • 21,832
  • 11
  • 51
  • 67
16
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
  • 221
  • 1
  • 2
  • 6
16
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
  • 23,973
  • 10
  • 81
  • 92
15
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
  • 4,145
  • 9
  • 41
  • 78
15
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
  • 691
  • 5
  • 13
  • 26
14
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
  • 3,602
  • 8
  • 36
  • 52
13
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,265
  • 2
  • 12
  • 28
13
votes
4 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…
user5134456
13
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
  • 812
  • 3
  • 12
  • 30
12
votes
3 answers

Adding Dynamic Number of Listeners(Spring JMS)

I have a requirement to add multiple listeners as mentioned in the application.properties file. Like Below, InTopics=Sample.QUT4,Sample.T05,Sample.T01,Sample.JT7 NOTE: This number can be lot more or less. I am thinking of getting them in an…
Rajkishan Swami
  • 3,569
  • 10
  • 48
  • 68
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
  • 317
  • 1
  • 4
  • 12
1
2 3
99 100