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

Spring Bean Custom Scope JMS

I am using Spring Framework to concurrently consume messages off of a JMS queue using a DefaultMessageListenerContainer. I want the ability to create new instances of the beans that are autowired for each message that comes in. I thought setting…
Mrc0113
  • 453
  • 3
  • 13
5
votes
2 answers

how to resolve "WARN: AMQ212054: Destination address=examp is blocked"

I'm completely new to Spring JMS. I'm running a Spring JMS simple chat application using ActiveMQ Artemis. After calling send() I'm getting this: WARN: AMQ212054: Destination address=examp is blocked. If the system is configured to block make sure…
Darpan
  • 53
  • 1
  • 4
5
votes
2 answers

How to thread pool a Spring JMS listener

I am setting up a JMS subscriber listener as follows with the goal of achieving a pool of 5 threads listening to topATopic, however, what I see at runtime is multiple consumers processing the same record (recordCount*#of consumers). I am assuming I…
cmutt78
  • 861
  • 1
  • 9
  • 18
5
votes
0 answers

Spring-boot + SQS Does not recover after AWS Instability

In our application we are currently using JmsListener + AWS SQS. It's work well for some time, but when happens some AWS Instability (ex: Service Unavailable), it's consumer try to recover by shutting down and restarting again, but after started…
5
votes
2 answers

ActiveMQ gives: "Could not connect to broker URL: tcp://localhost:61616" after around 10 000 messages

ActiveMQ gives: "javax.jms.JMSException: Could not connect to broker URL: tcp://localhost:61616. Reason: java.net.BindException: Address already in use: connect" after around 10 000 messages Then after a some time (around 1-5 seconds) start to get…
5
votes
0 answers

How to unit test a JMS listener in spring boot?

I want to write unit test for a method which is annotated by @JmsListener. But I don't know how to do it. Anybody please help me.
Karthikeyan
  • 123
  • 2
  • 2
  • 7
5
votes
0 answers

Java Spring JMS: JmsTemplate to IBM MQ

Update It was my mistake I forget the ssl debugging running, it is super fast now and working like magic I have a Spring Boot application that connects to IBM MQ using spring JMS. I realized that the jmsTemplate is super slow compared to not using…
Rand0m
  • 342
  • 1
  • 4
  • 10
5
votes
1 answer

Springboot JMS LIstener ActiveMQ is very slow

Im having a SpringBoot application which consume my custom serializable message from ActiveMQ Queue. So far it is worked, however, the consume rate is very poor, only 1 - 20 msg/sec. @JmsListener(destination = "${channel.consumer.destination}",…
Lynx777
  • 332
  • 1
  • 6
  • 17
5
votes
1 answer

Spring boot with tibco jms listener

I am trying to listen Tibco ems queue (wants annotation based configuration) from SpringBoot. I don't see any example which described how to configure and listen Tibco ems queue from SpringBoot. Any lead or example on this ?
Sanjay Chandak
  • 61
  • 1
  • 1
  • 4
5
votes
1 answer

DefaultJmsListenerContainerFactory and Concurrent Connections not shutting down

I am using Spring 4.x's DefaultJmsListenerContainerFactory in order to connect to an ActiveMQ Queue, process the messages from that queue using a @JmsListener and then push the message to a topic on the same ActiveMQ broker. I am using a single…
jcb
  • 195
  • 1
  • 4
  • 20
5
votes
1 answer

Using passed in Value for @JmsListener's destination paramter

Is there a specific way to accomplish this? I tried to find a solution on here but couldn't find what I need. I have a Spring Boot application that will be accepting multiple arguments from the command line. The argument in question is the queue…
LumberSzquatch
  • 1,054
  • 3
  • 23
  • 46
5
votes
1 answer

How to pause and start consuming message using @JmsListener

I am using spring boot version 1.3.2. I am using @JmsListener to consume message from activemq for the message that I created/produced using JmsTemplate. Here is the code: @JmsListener(destination = "myqueue") public void consumeMsg(Object…
bhasky
  • 73
  • 1
  • 5
5
votes
1 answer

Multiple transaction managers NoUniqueBeanDefinitionException

I'm using Spring boot and I defined the spring.datasource.* properties to enable my datasource. If I only use this it works fine. However, I'm now trying to add JMS to my application as well, using the following…
g00glen00b
  • 41,995
  • 13
  • 95
  • 133
5
votes
2 answers

Could not refresh JMS Connection for destination 'queue://inventorydsDestination' - retrying in 5000 ms. Cause: AOP configuration seems to be invalid

I'm getting the following exception when I re-deploy the application war in the Tomcat manager. For example, on first time deployment it connects to the external ActiveMQ properly but when I stop/start the war in Tomcat manager, then the following…
5
votes
0 answers

Unable to use spring.activemq.broker-url from yaml configuration file

I'm trying to inject activemq properties from a yaml configuration file. i initially used a property file, and it worked pretty well, but with the yaml file, the property spring.activemq.broker-url is apparently ignored by spring-jms, and the…
mab
  • 176
  • 2
  • 13