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

How does spring look for @EnableJms methods if I don't have class marked @EnableJms annotation?

I am reading official get started article about how to start spring-jms application https://spring.io/guides/gs/messaging-jms/ @EnableJms triggers the discovery of methods annotated with @JmsListener, creating the message listener container under…
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
6
votes
1 answer

How to Give manual Acknowledge using JmsTemplate and delete message from Rabbitmq queue

I am using RabbitMq(with JMS) with jmsTemplate I am able to Consume Message from RabbitMq Queue But it is taking acknowledgment AUTO. I have Search API for it but not able to find it out. How can I set manual acknowledgment. In Below code when…
Abhijeet Behare
  • 597
  • 1
  • 7
  • 21
6
votes
3 answers

Using @JmsListener with multiple payload types for the same destination?

I can write instances of multiple types to a given destination, e.g.: JmsTemplate template = ... Alpha alpha = new Alpha(...); Beta beta = new Beta(...); template.convertAndSend("my-destination", alpha); template.convertAndSend("my-destination",…
George Hawkins
  • 37,044
  • 7
  • 30
  • 43
6
votes
3 answers

Spring JMSListener - How should it handle empty payloads?

I asked basically the same thing a few months ago with this post: How should a Spring JMS listener handle a message with an empty payload?, but all I got was a measly comment suggesting I "re-write my listener to do what I want". Valid statement,…
LumberSzquatch
  • 1,054
  • 3
  • 23
  • 46
6
votes
1 answer

ActiveMQ with Spring JMS - how to sent NONPERSISTENT message?

I am trying to explicitly set deliveryMode to NONPERSISTENT and send it to ActiveMQ. Here is my Spring JMS configuration:
mlewandowski
  • 802
  • 7
  • 14
6
votes
0 answers

Spring batch JMS writer/reader example

Anybody know of a good resource for a detailed (more so than the Spring Batch docs) look at the uses of JMS Item Writer/Reader in Spring Batch? Specifically, and because I'm being tasked with trying to reuse an existing system whose only interface…
revdrjrr
  • 1,025
  • 1
  • 8
  • 16
6
votes
2 answers

How to set waiting timeout on JmsMessagingTemplate.sendAndReceive

I'm using sendAndReceive from JmsMessagingTemplate in an MVC controller but if no reply message is sent it seems to keep waiting on a reply forever. The documentation states that: Returns: the reply, possibly null if the message could not be…
ZT827
  • 161
  • 1
  • 2
  • 12
6
votes
4 answers

Spring mappingjackson2messageconverter give null pointer exception

I'm trying to convert a java object to json format using mappingjackson2messageconvertor but looks like it is not converting to json object instead throwing nullpoint exception error. Wondering what i'm doing wrong. I have checked one of the…
user1595858
  • 3,700
  • 15
  • 66
  • 109
6
votes
1 answer

Spring Integration with JMS + ActiveMQ: Messages remain in JDBC Message Store after reconnect

I'm trying to configure JMS with Spring Integration and an ActiveMQ Message Broker. My outbound channel should be backed by a JDBC Message Store to prevent data loss e.g. the broker or my application goes offline. My configuration seems to work so…
Thomas Junk
  • 5,588
  • 2
  • 30
  • 43
6
votes
2 answers

Security:090398 Invalid Subject - Spring and weblogic

I am writing a new application using spring and JMS. Myintent is to use Spring's Asynchronous Reception - Message-Driven POJOs. I get the following…
datta
  • 521
  • 2
  • 5
  • 16
6
votes
1 answer

Multiple DefaultMessageListenerContainer feeding a single TaskExecutor/ThreadPool (fairly)

I'm working on a spring boot application in which I intend to consume JMS messages from multiple queues - but I'd like to control the overall number of executing threads processing these messages as opposed to controlling the number of threads…
Harry Lime
  • 29,476
  • 4
  • 31
  • 37
6
votes
2 answers

When does a single JMS connection with multiple producing sessions start becoming a bottleneck?

I've recently read a lot about best practices with JMS, Spring (and TIBCO EMS) around connections, sessions, consumers & producers When working within the Spring world, the prevailing wisdom seems to be for consuming/incoming flows - to use an…
Chad
  • 341
  • 6
  • 18
6
votes
2 answers

Properly Shutting Down ActiveMQ and Spring DefaultMessageListenerContainer

Our system will not shutdown when a "Stop" command is issued from the Tomcat Manager. I have determined that it is related to ActiveMQ/Spring. I have even figured out how to get it to shutdown, however my solution is a hack (at least I hope this…
Johnny
  • 678
  • 1
  • 6
  • 16
6
votes
2 answers

Difference between sessionTransacted and JmsTransactionManager

What is the main difference between using sessionTransacted=true (in JmsTemplate and/or DefaultMessageListenerContainer) and using JmsTransactionManager? Is using sessionTransacted=true enough for both JmsTemplate and DefaultMessageListenerContainer…
Arya
  • 2,809
  • 5
  • 34
  • 56
6
votes
2 answers

Spring, JMS - Unable to locate Spring NamespaceHandler for XML schema namespace

Over and over I'm getting this error: 10:37:21,270 ERROR DispatcherServlet:466 - Context initialization failed org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring…
mattis
  • 211
  • 3
  • 10