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
1
vote
0 answers

Configure MQ Call for local testing Jetty

I was successful in making MQ call on my websphere server. But I am having hard time to make the same work on local jetty server. I am not even bale to start my server locally because of jms error. I have two jndi name configured on websphere…
ajaygoyal
  • 31
  • 3
1
vote
1 answer

Spring jmsTemplate send Unit testing doen't work

My service method looks like below, I am trying to mock JmsTemplate so that it can send message during unit testing, but it doesn't execute jmsTemplate.send(...), it directly goes to next line, How can i execute jmsTemplate.send(..) part of code of…
Chintan
  • 906
  • 4
  • 14
  • 30
1
vote
2 answers

activemq browse command with selector

I'm using the UNIX commands that ActiveMQ provides for browsing the queues, and I'm trying to browse a particular queue, specifying a JMS selector. This is what I'm trying to do: ./activemq browse --amqurl tcp://host:port --msgsel…
Perimosh
  • 2,304
  • 3
  • 20
  • 38
1
vote
1 answer

active mq and spring jmstemplate how to properly shut down

For some context I am doing a JMS reader and writer in Spring batch using a jsr compliant implementation. I am using the JMSReader and JMS writer classes provided by Spring batch but I am wrapping them in my own reader and writer. I do not have…
Mark Kouba
  • 236
  • 2
  • 12
1
vote
0 answers

Configure useAsynSend in jmsTemplate with JNDI

I am using jmsTemplate with the below spring configuration [ using "*****" to conceal structure ]. I want to configure useAsyncSend=true in this configuration so that the jmsTemplate will not wait for ack from broker. I am not sure on how to go…
fixxxer
  • 11
  • 2
1
vote
0 answers

Spring jmsTemplate messageConvertor.fromMessage() not being called

I have the following convertor: @Component public class EventConverter implements MessageConverter { @Override public Object fromMessage(Message message) throws JMSException, MessageConversionException { // ...DO SOMETHING…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
1
vote
1 answer

Transacting bulk publishing Spring JMS and Websphere MQ

I need to send multiple messages at once to N topics. The messages know how to route themselves. If any of the publications fails, all of the prior publications need to rollback. Is this possible on Websphere MQ and, if so, how?
Virmundi
  • 2,497
  • 3
  • 25
  • 34
1
vote
1 answer

JmsTemplate and CachingConnectionFactory

I'm finding some difficulties in trying to reduce the connection and session creation when sending messages to a Jboss Queue.
Massimo
  • 692
  • 2
  • 11
  • 29
1
vote
2 answers

Using topics but not all the consumers take the message

I want to create a sender to generate message and the send it to all consumers. I am using topic, but something is wrong, if for example I have 3 consumers, only one takes the message in a random way. I don´t know what is wrog. Here is my server…
Rys
  • 4,934
  • 8
  • 21
  • 37
1
vote
1 answer

Spring: JMSTemplate/CachingConnectionFactory deployables unable to start automatically in weblogic

I recently changed some of my application to use the the following: org.springframework.jndi.JndiTemplate org.springframework.jms.connection.CachingConnectionFactory org.springframework.jms.core.JmsTemplate Everything is working fine and…
Mark
  • 25
  • 1
  • 7
1
vote
1 answer

Spring : JMS Consumer Sessions/Connections not removed on Message Broker post Batch Job Completion

I have a Batch Job Configured to read messages from JMS Destination and write to a XML file using Chuck Tasklet. The JMS reader is custom implemented which inturn invokes JMSTemplate's receive method. I am using webMethods Broker as JMS Broker.…
1
vote
3 answers

Stop a spring jms message listener

I have a scenario where i need to stop the spring's DefaultMessageListenerContainer and then later start that again. I have 10 different DefaultMessageListenerContainer listening to 10 different queue. All 10 different containers are calling the…
vashishth
  • 2,751
  • 4
  • 38
  • 68
1
vote
1 answer

JMSTemplate "sessionTransacted" behavior while sending non-persistent messages to ActiveMQ broker

I want to understand behavior(sync or async) of transacted sessions in spring JMSTemplate while sending non-persistent messages to the ActiveMQ broker. I am talking about the JMSTemplate configuration where Session is transacted and messages sent…
Anuj Khandelwal
  • 835
  • 2
  • 15
  • 31
1
vote
2 answers

Spring JmsTemplate's Daemon threads that stay alive after stopping tomcat application

I am sending a message to IBM WebSphere MQ(the mq jar version is 7.0.1.9 and javax.jms is 1.1) using a Spring JmsTemplate class from my web application. The connectionFactory i am using is MQQueueConnectionFactory. The following daemon threads…
Santosh budhe
  • 67
  • 1
  • 12
1
vote
1 answer

JmsTemplate - define concurrency per queue?

So far i've only been able to find concurrency setting in the jms connection factory:
Urbanleg
  • 6,252
  • 16
  • 76
  • 139