spring-jms

How to know if a listener gets the message in JMS?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 11:57:05
问题 I'm using Spring JMS and ActiveMQ to send message from one sender to multiple listeners asynchronously. All listeners subscribe to an ActiveMQ Topic so that the message can be delivered to them. I want to know if a particular listener gets the message from the sender. Is there a way to achieve this? Edit: Added the JMS sender and listener classes This is my message sender class: public class CustomerStatusSender { private JmsTemplate jmsTemplate; private Topic topic; public void

Not able to get response from IBM MQ using JMS application

喜你入骨 提交于 2019-12-23 07:47:39
问题 We communicate with the third party using IBM MQ in request/reply fashion. We send them request and they give us reply. Current we both have a simple java based native IBM MQ application. We are planning to rewrite our code using spring jms. But we are not getting any response back within given time when spring jms is used. We are using JMSTemplate to send or receive messages. I am sharing my code snippet. Am I doing anything wrong here? Any other properties should I set here? // Request Part

Method with @JmsListener not executed when setting custom message converter

懵懂的女人 提交于 2019-12-23 05:15:59
问题 Hy, Having these three classes I have found a problem: package xpadro.spring.jms; import javax.jms.ConnectionFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.Bean; import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.support.converter.MarshallingMessageConverter; import org

Writing messages with Spring JmsTemplate using a TransactionManager

自闭症网瘾萝莉.ら 提交于 2019-12-23 03:54:19
问题 Using Spring-JMS it is possible to receive messages within an external transaction context via the DefaultMessageListenerContainer. However the only documented way to write a message is via JmsTemplate.send(…) and I can't see how this can be coerced to use a given TransactionManager . Can anyone point me in the right direction? More info: Ensuring a transaction manager is available ( WebSphereUowTransactionManager ), using JmsTemplate.write against an Oracle AQjmsFactory

Error in setExceptionListener in sending message via JmsTemplate to ActivemQ (as external broker of Jboss-eap)

。_饼干妹妹 提交于 2019-12-23 02:42:45
问题 Based on this article, I've connected Jboss eap 6.2 to an external ActivemQ 5.9.0 . For sending/receiving message i'm using JmsTemplate and DefaultMessageListenerContainer in spring-jms 4.1.1 . Receiving message is working fine, but in sending message i get this error: 11:33:37,059 ERROR [stderr] java.lang.reflect.InvocationTargetException 11:33:37,060 ERROR [stderr] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 11:33:37,060 ERROR [stderr] at sun.reflect

Spring Integration jms message driven channel adapter fails

青春壹個敷衍的年華 提交于 2019-12-23 02:38:48
问题 I am using spring integration 4.1.0 to implement message consumption from TIBCO EMS queue using jms-int:message-driven-channel-adapter I have 9 different message driven channel adapter listening at different server in different queue. Below is how the message driven channel adapters are defined <int-jms:message-driven-channel-adapter id="mdca1" connection-factory="connectionFactory1" channel="jmsChannel1" destination="queueName1" error-channel="errorChannel" max-concurrent-consumers="5" auto

spring configuring embedded BrokerService

两盒软妹~` 提交于 2019-12-22 08:53:10
问题 i would like to configure embedded ActiveMQ broker service inside spring mvc application. Here is my configuration @Configuration @EnableJms public class JmsConfiguration { @Bean(initMethod = "start", destroyMethod = "stop") public BrokerService brokerService() throws Exception { BrokerService brokerService = new BrokerService(); brokerService.setPersistent(false); brokerService.setUseJmx(false); brokerService.addConnector("vm://localhost:0"); brokerService.setBrokerName("broker");

ThreadPoolExecutor : : TaskRejectedException from Executor

别说谁变了你拦得住时间么 提交于 2019-12-22 08:23:19
问题 My application is reading messages through Jms MessageListener class and at some point of time it is throwing TaskRejectedException . I know most of you will say that the number of threads is exceeded by maxPoolSize and queue is also full. But I observed something. The number of messages sent to the queue from which the MessageListener class is fetching messages is 10353 and my spring property for threadPoolExecutor is below : <bean id="ticketReaderThreadPool" class="org.springframework

Spring web to connect to HornetQ JMS embeded with Jboss server 7.1.1

我是研究僧i 提交于 2019-12-21 21:28:01
问题 I am trying to setup spring-web to connect to remote Jboss-7.1.1 HornetQ JMS by following this site. But I am getting below error, is there anything I need to add the spring-bean configuration. The current spring-web runs on tomcat. spring-bean.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jms="http://www.springframework.org/schema/jms" xmlns:p="http://www.springframework.org

How to simulate message redelivery in AUTO_ACKNOWLEDGE JMS Session Scenario?

故事扮演 提交于 2019-12-21 01:19:35
问题 In the following test I'm trying to simulate the following scenario: A message queue is started. A consumer designed to fail during message processing is started. A message is produced. The consumer starts processing the message. During processing an exception is thrown to simulate message processing failure. The failing consumer is stopped. Another consumer is started with the intent to pick up the redelivered message. But my test fails and the message is not redelivered to the new consumer.