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

Synchronous Message send and receive using JMS template and Spring Boot

I am after sending/receiving call to JMS queue synchronously using JMS Template and Spring boot. I went through official spring doc for JMS template but of no help. I am not too sure about calling receive() method specifically or it will…
Sunny
  • 99
  • 1
  • 2
  • 7
0
votes
1 answer

Spring JMSTemplate UncategorizedJmsException with ArtemisMQ

It works normal long time before. this error just happens when I try to loop 10000 items and send one-by-one to jms queue. I am getting the following error when trying to send message to my JMS…
m.nguyencntt
  • 935
  • 13
  • 19
0
votes
1 answer

Send multiple jms messages in a single transaction

Instead of sending single message in a transaction: jmsTemplate.convertAndSend(message); How can I send multiple jms messages in a single transaction? Is there an example I can loot at?
breaktop
  • 1,899
  • 4
  • 37
  • 58
0
votes
1 answer

java.lang.NoClassDefFoundError when sending to oracle aq

I am getting the following exception in my Spring application: Exception in thread "Thread-0" Exception in thread "Thread-1" java.lang.NoClassDefFoundError: javax/transaction/Transaction at oracle.jms.AQjmsSession.(AQjmsSession.java:364) …
M06H
  • 1,675
  • 3
  • 36
  • 76
0
votes
2 answers

Spring JMS : Configure Multi Consumer client

I am developing a Spring JMS based client, which connects to an IBM MQ. This part is working fine !! Scenario: The MQ client can get a request from multiple Spring "@Components". Considering, JMSTemplate's "send" and "receive" are completely…
Deep
  • 673
  • 1
  • 10
  • 23
0
votes
1 answer

MessageListener not working?

I have hornetQ application working. I am trying to move it to artemis. I use jmsTemplate to exchange messages. the jmsTemplate.sendAndReceive() works for both server and client. I create a consumer with custom messageListener for both server and…
Mauro Kade
  • 11
  • 4
0
votes
2 answers

Failed to build body from content in activeMQ - Spring generic message used

I send a org.springframework.messaging.support.GenericMessage to a queue in ActiveMQ by org.springframework.jms.core.JmsTemplate. in ActiveMQ, I see this message : Cannot display ObjectMessage body. Reason: Failed to build body from content. …
Hamid
  • 33
  • 1
  • 7
0
votes
1 answer

Losing JMS Messages with Spring JMS and ActiveMQ when application server is suddenly stopped

I have a Spring JMS application that has a JMS Listener that connects to an Active MQ queue on application startup. This JMS listener is a part of the an application that takes a message, enriches it with content, and then delivers it to a topic on…
jcb
  • 195
  • 1
  • 4
  • 20
0
votes
2 answers

Spring jms to Websphere MQ connection error

AppConfig.xml settings:
0
votes
1 answer

Integration testing of JMS

I have a suite of integration tests, which creates a full Spring context for my application, mocks out the end points towards other application and runs tests, for instance calling a REST-service and then check the result in the database, that other…
Tobb
  • 11,850
  • 6
  • 52
  • 77
0
votes
1 answer

How to implement JMS local queue using Spring 3.05 and JBoss 5.1 (JBossMQ)?

There is an application based on Spring 3.0.5 framework running on JBoss 5.1 server. I tried to follow this tutorial, but it uses the ActiveMQ broker instead of JBossMQ (default JBoss 5.1 broker). I've already set a queue called MyQueue in JBoss…
jguilhermemv
  • 769
  • 3
  • 11
  • 28
0
votes
2 answers

How to remove JMS reader from message received via MQ using JMS template

I am trying to read an message from IBM message queue using JmsTemplate and displaying the same on console, but when it gets printed I observed the JMS header is also getting attached with my message as follows: JMSMessage class: jms_text …
Manoj
  • 25
  • 6
0
votes
1 answer

Spring JMS using MarshallingMessageConverter while supporting String, etc

Using XML configuration - I have MarshallingMessageConverter working; however, I still want to send some messages as TextMessage with simple String values. It seems that my configuration is forcing me to go from one ditch (No automatic JAXB…
thinice
  • 700
  • 5
  • 19
0
votes
1 answer

Tibco SSL communication says no trusted certificates are set

I am trying to establish a SSL communication with Tibco EMS. TCP communication is successful and I was able to publish a message. I ma configuring it with JMS template. Below are the properties I have for communicating with Tibco. #Tibco EMS…
Koushik
  • 23
  • 1
  • 6
0
votes
1 answer

Task Not Serializable Exception - When using JMSTemplate in Spark foreach

I am trying to use Spring JMSTemplate class inside rdd.foreach method, but i am getting Task Not Serializable error. When i try with static variable it worked on local but in cluster, i am getting null pointer exception. Sample…
Shankar
  • 8,529
  • 26
  • 90
  • 159