Questions tagged [jmstemplate]

Spring helper class that simplifies synchronous JMS access code

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.

The JmsTemplate class is the central class in the JMS core package. It simplifies the use of JMS since it handles the creation and release of resources when sending or synchronously receiving messages.

Code that uses the JmsTemplate only needs to implement callback interfaces giving them a clearly defined high level contract. The MessageCreator callback interface creates a message given a Session provided by the calling code in JmsTemplate. In order to allow for more complex usage of the JMS API, the callback SessionCallback provides the user with the JMS session and the callback ProducerCallback exposes a Session and MessageProducer pair.

206 questions
0
votes
0 answers

Problems with jms client after switching spring boot from 2.7.x to 3.1.x (IBM MQ)

I've migrated my spring boot app from ver 2.7.8 to 3.1.1 I have switched my client mq-jms-spring-boot-starter from 2.7.5 to 3.1.1 I use: com.ibm.mq:com.ibm.mq.jakarta.client:9.3.3.0; com.ibm.mq:mq-jms-spring-boot-starter:3.1.1 Java 17 (Amazon…
Ubizza
  • 1
  • 1
0
votes
1 answer

how to increase the number of threads/task inserting into MQ using JMS caching connection factory?

I have a Kafka consumer with 10 consumer threads consuming from 10 partitions and inserting into MQ using the JMS template caching connection factory (SessionCacheSize(10)). The MQ insertion part is ASYNC here. So, the Kafka consumer part and MQ…
Misubushi
  • 57
  • 1
  • 7
0
votes
1 answer

ActiveMQ 5.17.0 and Spring JMS 6.0.4 is not working

I am trying to migrate the spring-jms 5.3.23 to 6.0.4 version. Spring JMS is now using the Jakarta Messaging API, and that is not working with ActiveMQ 5.17.0 libraries. I couldn't find latest ActiveMQ libraries to work for Spring JMS 6.0.4. I…
0
votes
1 answer

How to ensure multiple jms listener instances process messages only when currently executing listener instance acknowlege

I'm currently trying to build a messaging application using JMS Listener and IBM MQ, and I need to ensure that I can run two instances of the same listener at the same time. However, I want to make sure that the second instance waits until the first…
Bifrost
  • 417
  • 5
  • 23
0
votes
1 answer

ActiveMQ Artemis temp queue

I'm using simple test project with Spring's JmsTemplate that sends synchronous messages with: jmsTemplate.sendAndReceive(...) Code snippet of JmsTemplate to do this: Message requestMessage = messageCreator.createMessage(session); responseQueue =…
0
votes
1 answer

ActiveMQ Artemis - Queue published to but not consumed

I have a test application (Spring Boot 2.7.8) that uses ActiveMQ Artemis 2.27.1 as a messaging system. I have a 6 node cluster split into 3 live/backup pairs. Load balanced using ON_DEMAND with a redistribution delay of 2000. The application creates…
Ian Cox
  • 31
  • 4
0
votes
1 answer

JMS Template close the connection before acknowledgement

The application use JMS template to connect MQ. Post consumer read the message when it goes to acknowledge the error thrown below. com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0020: This session is closed. An application called a…
Sarvesh H
  • 33
  • 4
0
votes
0 answers

DefaultJmsListnerContainerFactory concurrency not working

This is my JMS configuration: @EnableJms @Configuration public class VmsJmsConfig implements JmsListenerConfigurer { @Value("${spring.activemq.broker-url}") String brokerUrl; @Value("${spring.activemq.ssl.trustStorePath}") String…
Parth
  • 1
  • 1
0
votes
0 answers

Does Springboot JMSTemplate.send method provides any retry mechanism in case of exceptions?

i am implementing the Jmstemplate for sending message to Active MQ. for the first so i dont want to have any issue in prod. does Springboot JMSTemplate send method provide any retry mechanism in case if message doesn't gets send in first go? maybe…
Priyank
  • 11
  • 2
0
votes
1 answer

2 Spring @JmsListeners on 1 queue

I have 2 @JmsListener instances on 1 queue, and I want to take a fixed number of messages from the queue and then hold the rest in pending for some time for bulk processing. I have added the condition to check the number of pending message, but due…
0
votes
2 answers

Using Spring boot JMS to send and receive messages over IBM MQ

Following instructions provided in https://developer.ibm.com/tutorials/mq-jms-application-development-with-spring-boot/, I developed a sample Spring boot web application in order to be able to send and receive messages over IBM MQ using JMS…
fredege
  • 17
  • 1
  • 3
0
votes
0 answers

ActiveMQ Artemis, Spock, & Spring JMSMessagingTemplate - test is unstable

I have a Spring Boot application I'm trying to migrate to use spring-jms dependency instead of spring-activemq. I have a few tests written with Spock. I also want to use either spring-jms-server or artemis-junit module. These tests use a…
Themikebe
  • 361
  • 1
  • 3
  • 11
0
votes
1 answer

How do I stop the JMS Listener thread until the spring is completely initialized

I have a scenario wherein the main thread is running the flyway migrations. In one of the migration scripts, we are sending a message to the JMS queue. This activates the JMS listener thread to process the message which in turn calls the service…
Geeky
  • 113
  • 9
0
votes
0 answers

Setup of JMS message listener invoker failed for destination 'TESTQUEUE' - trying to recover. Cause: null

My application run well in my local machine and i am able to connect to IBM MQ and poll message. I am facing below issue in polling after i deploy my application on open shift. Error: 2022-05-03 02:02:24.418 DEBUG 7 --- [ main]…