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

Tomcat 6 to IBM MQ 9.0.0.6 using jmstemplate hanging threads on RemoteHconn receiveAsyncTsh

We are connecting from a Tomcat 6 application to IBM MQ 9.0 using JMSTemplate from Spring 2.0.8 and mqjms jar of 7.0.x. Application is very old and being ported from OC4J to Tomcat, that is why is old version of java and libraries are used.…
0
votes
1 answer

Configuring jms receive and send queues in same config class

I have the below mq config class by which I can receive message in the receive queue, but when using the JmsTemplate bean my messages are not sending to queue. I do not get any JmsException or any exceptions and send() seems successful. It is piece…
M06H
  • 1,675
  • 3
  • 36
  • 76
0
votes
1 answer

Is it possible to configure a jmsTemplate Topic publisher and also a Queue message producer in the same springboot application

My application is using a Queue Originally, So I need to also Implement a Topic for the same application. I'm having difficulties setting up the configurations. please help guys
0
votes
3 answers

Difficulty implementing Spring Retry Logic for publisher

I have a Spring Boot application that has a JMS Publisher. The publisher used retry logic that was in the publisher class that worked fine. But I want to change that to the Spring Retry Template and put it into the connection factory…
Gloria Santin
  • 2,066
  • 3
  • 51
  • 124
0
votes
1 answer

Add an outgoing interceptor on JMS messages

I'm working on some project where I'm building some JMS messages that I want to send using JmsTemplate, which is initialized in a Spring Boot app, via JNDI naming. As my Broker is IBM MQ Series, I need to change the encoding value in the outgoing…
DamCx
  • 1,047
  • 1
  • 11
  • 25
0
votes
1 answer

Why are the number of reported activemq queues changing when using jmstemplate?

When using JmsTemplate to get the list of activemq queues, the number of queues reported changes private Set queues = new HashSet<>(); try(ActiveMQConnection connection = (ActiveMQConnection) …
D R
  • 41
  • 1
  • 6
0
votes
0 answers

How to recieve a message from a MQ queue and publish the same message to a topic using Spring Boot

I am developing a spring boot application which should recieve message from IBM MQ and publish the same message onto a topic in SpringBoot JMS. I am able to recieve the Message in the onMessage() of MessageListener but not able to publish the same…
jkalyanc
  • 137
  • 1
  • 2
  • 13
0
votes
1 answer

Spring JmsTemplate.setMessageId is overridden

I'm exploring jmsTemplate implementation and faced an issue. A JMSMessageId can be manually applied to a message, but a callback returns different MessageId. Sample code: log.debug("Sending request " + jmsMessageId); final AtomicReference
Ermintar
  • 1,322
  • 3
  • 22
  • 39
0
votes
1 answer

Trigger Axon's @EventHandler from JmsListener

In spring, org.springframework.amqp.rabbit package has made easier integration of RabbitMQ. To move to ActiveMQ, I couldn't figure to directly support ActiveMQ in spring axion framework, but only with JMS as an interface. Now in sender side, I…
Mukarram Ali
  • 387
  • 5
  • 24
0
votes
1 answer

Bean definition example for JndiDestinationResolver using jndi look up

I'm working on sending and receiving messages to/from an IBM MQ queue using JmsTemplate. My application is installed on a WebSphere application server 8.0 and, in order to retrieve the connection, I use a jndi lookup. I have 6 queues from where I…
Nik
  • 5
  • 1
  • 3
0
votes
1 answer

Unable to send messages using AMQP with Spring boot JmsTemplate

I'm trying to send messages using the JmsTemplate of Spring boot. I configure everything using the autoconfiguration through properties. These are the properties I set : spring.activemq.broker-url spring.activemq.user spring.activemq.password I…
John
  • 17
  • 1
  • 4
0
votes
1 answer

JMSTemplate with multiple brokers. Destination resolving exception

I have problem which I am trying solve all day, without success... I have an application which trying to send/receive messages to/from external system A and external system B. A and B it is WLS based external systems. While my application is coming…
liotur
  • 809
  • 2
  • 17
  • 36
0
votes
0 answers

Only one message get dequeued when configuring JmsTemplate with SESSION_TRANSACTED

I am trying to configure JmsTemplate in transactional manner, so when error occures durring the processing or writing, i want the messages to be visible in the queue again. I have the below configurations which seems to works fine when error occures…
0
votes
1 answer

Spring integration recipient-list-router issue

I am using a recipient-list-router in my application to send message to different JMS outbound adapters as shown here: queue -> recipient-list-router -> queue1 -> JMS outbound adapter 1 -> queue2 -> JMS outbound…
0
votes
1 answer

Spring Batch & Spring Integration (JMS) & Load Balance Slaves

I'm using Spring Batch Step 1 Step 2 Master (Partitioner) Step 3 Spring Integration (JMS) to communicate Master and Slave The issue we are seeing is, the first slave handles all JMS messages instead of even distribution between slaves. See…
Nghia Do
  • 2,588
  • 2
  • 17
  • 31