Reputation: 77
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?
Upvotes: 1
Views: 300
Reputation: 174494
If you use a CachingConnectionFactory
, the producer will be cached by default in the connection factory. Note: if you use variable concurrency in the inbound adapter, be sure to set cacheConsumers
to false
in the connection factory; we don't want consumers cached there (it's ok in the container).
Upvotes: 0