Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

SpringIntegration-cache producer in OutboundChAdapter that uses session from msgdrivenchadapter

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have designed the following messageflow

1) message-driven-channel-adapter ->
1.1) service-activator -> outbound-channel-adapter (for sending response)
1.2) in a chain - transformer -> outbound-channel-adapter (for sending error)

The message driven channel adapter picks message from websphere MQ and it is configured with DefaultMessageListenercontainer. Outbound channel adapter sends the message to websphere MQ and have configured JMS template for that.

The problem is, performance looks very low. I have used cache_consumer and acknowledge="transacted at message-driven-channel-adapter. I dont feel message-driven-channel-adapter would be an issue. I feel performance issue is due to jmstemplate used in outbound-channel-adapter, because everytime it creates a producer from the session provided downstream from message-driven-channel-adapter.

Is there a way to cache the producer used by jmstemplate.Can anyone please tell me as how i could improve the performance?

Thanks.
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you using a CachingConnectionFactory? If not you should. Also another time I have seen this sort of things is when the number of threads exceed the number of available connections in the pool for the database. In this case things actually bottleneck waiting for a connection from the pool. You can also profile that aspect of your application to rule it out.
 
vidya Ba
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Bill. I was able to resolve the issue using cachingconnectionfactory. Had to set cacheConsumers to false and cacheProducers to true in the factory. Also set CACHE_CONSUMER at message-driven-channel-adapter in DefaultMessageListenerContainer as suggested by Gary in http://stackoverflow.com/questions/26277117/how-to-cache-producer-in-outbound-channel-adapter-when-it-uses-session-from-upst
 
Bill Gorder
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad you got it working! Thanks for posting back with what worked.
reply
    Bookmark Topic Watch Topic
  • New Topic