spring-jms

Configuring multiple DefaultJmslistenercontainerfactory

醉酒当歌 提交于 2019-12-12 14:03:50
问题 In my app, I have 2 diff mq conn factory beans. For this I have 2 diff DefaultJmslistenercontainerfactory beans ex cf1 n cf2. Each of DefaultJmslistenercontainerfactory bean is being referred in seperate @JmsListener. ..Now i want to start stop each listrner programatically , for that I am overriding configureMessageListeners(JmsListenerRegistrar) method where I can set the DefaultJmslistenercontainerfactory instance. Note I only one instance can be set.. then in my code I get spring instance

JMS connections exhausted using WebSphere MQ

∥☆過路亽.° 提交于 2019-12-12 08:55:03
问题 I have configured CachingConnectionFactory that wraps a MQTopicConnectionFactory and MQQueueConnectionFactory with cache size set to 10 each. These are than used in several jms:outbound-channel-adapter or jms:message-driven-channel-adapter as part of various spring integration workflows that I have in my application. It is noticed that once in a while the connection count on MQ channel reaches maximum allowed (about 1000) when the process stops functioning. This is a serious problem for a

How to receive all the prefetch rabbitmq messages using spring framework?

爱⌒轻易说出口 提交于 2019-12-12 05:49:47
问题 I am learning to how use SimpleMessageListenerContainer to receive rabbitmq messages. My listener container has prefetchCount = 1000. However my listener worker implements the MessageListener interface which only receive one message at a time. Is there an interface to receive a list of messages? If there is not, how can I do to receive a list of messages? I don't want to process one message at a time but rather a list of them so I can do batch insert/update. I also want to acknowledge once

Connection Failure Using Spring-JMS DefaultMessageListenerContainer cacheLevelName CACHE_NONE

可紊 提交于 2019-12-12 05:43:42
问题 I change my Spring-JMS DefaultMessageListenerContainer implementations to use a cacheLevelName of CACHE_NONE and ran into the below exception. The changes were outlined here. I'm using glassfish v 2.1, Open MQ 4.4 and Spring 3.*. Any ideas on where I could have gone wrong? Web App Log: [#|2012-05-16T21:18:12.620+0000|SEVERE|sun-appserver9.1|javax.resourceadapter.mqjmsra.outbound.connection|_ThreadID=284;_ThreadName=updateJmsContainer-90;_RequestID=3aa71c9e-3ac0-4142-b914-ffbdc6e6bb37;|MQJMSRA

Should JmsTransactionManager be used when persisting from one JMS Queue to another JMS Queue

淺唱寂寞╮ 提交于 2019-12-12 05:07:04
问题 Requirement: We need to retrieve a message from a JMS Queue(published by a different application) and persist the message in our JMS Queue. Need the entire flow to be transactional so in case a message cannot be persisted in the downstream JMS queue, message received from upstream JMS Queue should not be acknowledged. My configuration is as below <int-jms:message-driven-channel-adapter id="MessageDrivenAdapter" channel=" jmsMessageChannel " destination="sourceDestination" connectionFactory=

Springframework.jms.support.JmsAccessor does not have createConnection(userid,pwd) method

荒凉一梦 提交于 2019-12-12 04:05:58
问题 I am writing sample Apache Camel (2.16.2) application that connects to IBM MQ queue manager in clients mode. Apache Camel uses Spring JMS underneath to connect to JMS providers. I see that Spring JmsAccessor does not have a createConnection () method that takes UserId and Password. It only has createConnection () method that does not take any parameters. Because of this create connection to queue manager fails with 2035 - Not authorized. I can connect to queue manager in server bindings mode

Spring JMS Producer and Consumer interaction

余生长醉 提交于 2019-12-12 03:55:55
问题 How can i determine if the consumer already received the message from the producer or how can i notify the producer that the message have already been sent/consumed in Spring JMS? 回答1: you need to use request/reply by using org.springframework.jms.core.JmsTemplate.sendAndReceive(...) on the producer side and on the consumer side the MessageListener method set in the container must return a value. or make your producer subscribing to ActiveMQ.Advisory.MessageConsumed.Queue to be notified when

Prevent use of CachingConnectionFactory with DefaultJmsListenerContainerFactory

坚强是说给别人听的谎言 提交于 2019-12-12 02:26:46
问题 I am working on a brand new project in which I need to have listeners that will consume messages from several queues (no need to have producer for now). Starting from scratch, I am using the last Spring JMS version (4.1.2). Here is an extract of my configuration file: <bean id="cachedConnectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory" p:targetConnectionFactory-ref="jmsConnectionFactory" p:sessionCacheSize="3" /> <bean id="jmsListenerContainerFactory" class=

Implementing Publish Subscribe using Spring Integration JMS in ActiveMQ

倾然丶 夕夏残阳落幕 提交于 2019-12-12 01:44:16
问题 I have developed a producer and consumer using Spring Integration API's PublishSubscribe Channel in ActiveMQ. I could publish and receive the messages using the implementation but only one service-activator consuming the message in round-robin fashion. I need to make sure whether it is right. Below are my configurations: Producer side: <int:publish-subscribe-channel id="jmsPubSubChannel" /> <int-jms:outbound-channel-adapter channel="jmsPubSubChannel" destination-name="${jms.topic.name}" pub

JMSTemplate with multiple brokers. Destination resolving exception

被刻印的时光 ゝ 提交于 2019-12-11 17:03:24
问题 I have problem which I am trying solve all day, without success... I have an application which trying to send/receive messages to/from external system A and external system B. A and B it is WLS based external systems. While my application is coming up - i am reading all configurations and building my applicational JMSProducer and injecting JMSTemlate with predefined destination name in it. Here is my code: private JMSProducer initProducer(Conf conf) { DestinationResolver destinationResolver =