Hello,
My Spring Integration application uses ActiveMQ as JMS server. There are plenty of "jms:message-driven-channel-adapter" and "jms:channel" in my application, which send the messages to ActiveMQ and get the messages from ActiveMQ.
Typical definitions of JMS channels and adapters are:
andCode:<jms:channel id="updateCreditCardChannel" queue="creditCardQueue" selector="ACTION = 'UPDATE'" transaction-manager="transactionManager" auto-startup="true" concurrency="10-50" receive-timeout="5000" acknowledge="transacted" message-converter="userMessageConverter" />
Here is definition of JMS connection factory:Code:<jms:message-driven-channel-adapter id="notificationAdapter" channel="processJSONNotificationChannel" destination="notificationQueue" transaction-manager="transactionManager" selector="originator = 'SS' AND eventCode = 'AUTHORISATION'" auto-startup="true" error-channel="errorChannel" header-mapper="activeMQRedeliveryCountMapper" acknowledge="transacted" max-concurrent-consumers="10" />
ActiveMQ is running locally on my developer machine or locally on development server.Code:<bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory"> <constructor-arg> <bean class="org.apache.activemq.ActiveMQConnectionFactory"> <property name="brokerURL" value="${jms.broker.url}" /> <property name="redeliveryPolicy"> <bean class="org.apache.activemq.RedeliveryPolicy"> <property name="maximumRedeliveries" value="10" /> <property name="initialRedeliveryDelay" value="1000" /> <property name="useExponentialBackOff" value="true" /> <property name="backOffMultiplier" value="5" /> </bean> </property> </bean> </constructor-arg> </bean>
The problem is that delivery of the messages is randomly slow. The message sent from one part of the application can be delivered to the channel or right now or in couple of minutes, or only on next startup of the processing application, or next startup of ActiveMQ server.
What can be a reason for slow delivery?
ActiveMQ version is 1.5.6
Spring Integration version 2.1.0.RELEASE


Reply With Quote