spring-jms

Complete Async web service communication - sender and receiver are not available same time

China☆狼群 提交于 2020-01-16 08:59:17
问题 Two systems are talking to each other through integration(Using apache-camel). Let say system A needs to submit a request to System B which has exposed a web service to receive data and integration is transforming data as per system B web service. In above scenario A and B has to be available same time and A will have to wait for response from B. I need to remove this dependency by putting queue at integration layer and with Async communication. Ex: <camel:route id="AtoIntegration"> <camel

JMS encoded message selector not matching when using special characters

对着背影说爱祢 提交于 2020-01-15 11:44:10
问题 I have 2 applications (client and server) using a request-reply pattern. The client sends a request to the server the message ID is set to something like this: ID=Hostname-52991-1357677886768-3:1:2:1:1 . Now the client has to listen to a message with a correlation ID set to the same value. Since the value contains special characters (:) I have to encode the value (using UTF-8). Sets the JMS Selector, which is an SQL 92 predicate that is used to filter messages within the broker. You may have

Disabling Spring JMS Auto configuration in Spring Boot Application

五迷三道 提交于 2020-01-10 21:47:08
问题 In my spring boot application i configure two different instances of MQQueueConnectionFactory (different id) as it is a need of the application. For that i have added ibm client jars. I have also added spring-jms dependency in my code as i wanted JmsTemplate etc classes. After adding this dependency, JmsAutoConfiguration finds JmsTemplate in classpath and tries to configure beans. In this process, it tries to inject bean of type ConnectionFactory and this is where the code fails and i start

Spring JMS Listener Container stop only half of listeners

泪湿孤枕 提交于 2020-01-07 03:34:12
问题 I have weired problem with a JMS Listener container. In case I disable the listener container, half of messages are delivered and processed by listener. Here is my Spring configuration: <bean id="ConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="JmsXA" /> </bean> <bean id="testQueue" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="queue/test" /> </bean> <bean id="listener" class="eu.cuptech.jms

javax.naming.NamingException: unexpected exception [Root exception is java.lang.NullPointerException]; remaining name FactoryName

巧了我就是萌 提交于 2020-01-07 02:31:54
问题 I have a Spring JMS project managed with Maven. When I run the project via Eclipse everything goes well, but when I launch it from the executable jar file I got the following error : INFO - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@12911b4f: defining beans [jmsBridgeServer,messageFrameStreamReader,outgoingMessageEventListener,serverLifecycleEventListener,jmsQueueConnectionFactory,jndiTemplate,jmsQueueTemplate,jmsDestinationResolver,jmsSender

javax.naming.NamingException: unexpected exception [Root exception is java.lang.NullPointerException]; remaining name FactoryName

空扰寡人 提交于 2020-01-07 02:31:05
问题 I have a Spring JMS project managed with Maven. When I run the project via Eclipse everything goes well, but when I launch it from the executable jar file I got the following error : INFO - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@12911b4f: defining beans [jmsBridgeServer,messageFrameStreamReader,outgoingMessageEventListener,serverLifecycleEventListener,jmsQueueConnectionFactory,jndiTemplate,jmsQueueTemplate,jmsDestinationResolver,jmsSender

DMLC message consumption and acknowledgement

爷,独闯天下 提交于 2020-01-06 14:56:29
问题 This is a follow up question for Difference between AUTO_ACKNOWLEDGEMENT mode with and without Spring JMS. I am using DMLC and my concurrent consumers count is 1. The prefetch limit is > 1. I received a message and it is acknowledged before listener is executed. So, while the listener is executing, broker has more messages and it sends it to consumer as per prefetch settings. Since the listener is still executing, how will the consumption and acknowledgement works for subsequent messages?

Displaying the listeners and their status in my application

白昼怎懂夜的黑 提交于 2020-01-06 08:37:11
问题 In my spring application, i want to display the Listeners and their running status.I am using @JmsListener anotation. I got hint from this url - Configuring multiple DefaultJmslistenercontainerfactory However, i am also facing a same challenge, I do get the listener statuses but not getting Id's of the listener. Further on, i want to start/stop the listener using same ids How can i get the id's of the Listeners? 回答1: There's not currently an API to get the list of listener container ids. I

Consuming messages from MQ and merging in Spring JMS

谁说胖子不能爱 提交于 2020-01-06 06:33:34
问题 I use spring + MQ + Websphere Application server. I want to consume messages from MQ asynchronously and combine the messages to have the List of messages to be easy to persist N number of Entities to Database in every single commit. (without stressing my target Oracle database with too many commits) I use The DefaultMessageListenerContainer and I made the onMessage method synchronized to add on the messages(Till batch size) and I create the Thread to wait for the condition to meet(time/size)

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

徘徊边缘 提交于 2020-01-03 17:24:28
问题 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 Message is consumed from queue I want to call web service with that message and depends on that response from from I want to delete that message from queue. I have created one project in which I am using Listener and other project with call to read