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
1 answer

JMS (ActiveMQ) - Event to be consumed only after another event was consumed

I have 2 events basically: UserCreatedEvent.class And UserUpdatedEvent.class I have a flow that produces these two events at once (remember this is only an example) Is it possible to make sure (with some configuration) that the 2nd event will be…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
0
votes
1 answer

How to inject JmsTemplate object using annotations in a spring class?

I am trying to inject a JmsTemplate object into a class using @Autowired, but it is giving a NullPointerException whenever I try to send messages. While in the application class I could instantiate jmsTemplate using the ApplicationContext…
Sami
  • 7,797
  • 18
  • 45
  • 69
0
votes
1 answer

Producers not getting cleaned while using CachingConnectionFactory

It seems the JMSProducer is not getting garbage collected and keeps alive after delivering messages to queue, I'm using Spring 3.2.2 and CachingConnectionFactory with Keep-alive setting for sending message. Producers count keeps increasing every…
Tarish Saini
  • 340
  • 1
  • 5
  • 14
0
votes
1 answer

Activemq jdbcPersistenceAdapter flushingmessages to database

I have a activemq jdbcPersistenceAdapter configured to use Oracle. The primary broker gets a lock, but when I send messages to the queue, I cannot see them in a database table. I do not want the the messages cached in any way, since they will not…
ed4becky
  • 1,488
  • 1
  • 17
  • 54
0
votes
1 answer

Spring DLMC and JMSTemplate behavior while using Transactions

I have a some questions regarding transactions in DMLC and JMSTemplate. Does Spring DMLC receive messages asynchronously using callbacks if we are not using transactions ? Does DMLC also receive messages asynchronous while using transacted session.…
Anuj Khandelwal
  • 835
  • 2
  • 15
  • 31
0
votes
1 answer

Unable to deque messages from Topic after the listener listens the messages in spring jms

I am sending the messages to Topic using oracle.jms.AQjmsFactory. The messages are stored in DB topic . Using DefaultMessageListenerContainer , the messages are being listen .But the problem is the messages are not dequeueing or deleting from the…
sanjana
  • 3
  • 1
0
votes
1 answer

How to configure concurrency to a single queue

I would like to configure number of consumers for a single queue in jms template. I tried to implement this: JmsTemplate - define concurrency per queue? but in the ActiveMQQueue is stiil shows 1. my messanging context:
lior
  • 1,127
  • 3
  • 24
  • 43
0
votes
1 answer

Spring application does not exit using JmsTemplate

I am integrating Spring-4 and Active-MQ 5.8. I have written small test code. It send message properly but it does not exit. The Sender Code is package sample.jms.activemq; import java.util.Map; import…
Learn More
  • 1,535
  • 4
  • 29
  • 51
0
votes
1 answer

How to post on multiple queues using single job/ JMSwriter in spring batch

I am a newbie at Spring Batch and have recently started using it. I have a requirement where I need to post/write the messages read from each DB record on different queues using single Job. As I have to use reader to read the messages from DB and…
-1
votes
1 answer

Database rollback not happening when using @JmsListener to listen to messages from IBM MQ

I am using the @JmsListener annotation from Spring JMS to consume messages from an IBM MQ queue, but when an exception occurs the database updates are not being rolled back. The JMS listener is only rolling back the MQ messages, i.e dequeuing the…
Bifrost
  • 417
  • 5
  • 23
-2
votes
1 answer

Camel ProducerTemplate is using same JMSCorrelationID for all messages, how to get unique id for each message produced?

I defined producer template using camel I am injecting this bean into one of my services to produce messages. msgProducerTemplate.sendBodyAndHeaders(endpointUri, message, headerMap); For all the messages…
Sri
  • 21
  • 4
1 2 3
13
14