java - Service Activator not completing before next message from JMS is processed -


the setup:
using spring integration grab messages message queue. message comes in xml format , method named parsecustpaymentxml gets called service activator, processes xml message, , stores in java objects. afterwards, method named processcustpayment called parsecustpaymentxml takes java objects , inserts them database. below how have inbound jms , service activator set up...

<int:channel id="jmsinchannel" />  <int-jms:message-driven-channel-adapter         destination="custpaymentrequestdestination"         connection-factory="jmsconnectionfactory"         channel="jmsinchannel"         concurrent-consumers="1" />  <int:service-activator id="parsecustpaymentserviceactivator"                        ref="custpaymentservice"                        input-channel="jmsinchannel"                        method="parsecustpaymentxml"                        requires-reply="true" /> 

the problem:
process not take long run, if message comes in while parsecustpaymentxml or processcustpayment still running, message pulled , parsecustpaymentxml kicked off concurrently first message process. not behavior prefer. wanting first message finish before next message started (non-concurrent).

please let me know if more information required help.

with concurrent-consumers="1", 1 message processed @ time; make sure haven't declared inbound adapter twice? it's common mistake - in web applications.

turn on debug logging , should become clear


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -