SyntaxHighlighter

Showing posts with label WebSphere MQ. Show all posts
Showing posts with label WebSphere MQ. Show all posts

Tuesday, July 2, 2013

Spring Integration, WebSphere Application Server and the TopicConnectionFactory in a Cluster (Active-Active)

Spring Integration, WebSphere Application Server and the TopicConnectionFactory in a Cluster (Active-Active)

so, something i recently came across with when setting up a TopicConnectionFactory on WebSphere is the difference between Cluster level and Node level.  when setting up a QueueConnectionFactory, you can set once at the Cluster level, and all the Nodes replicate the setup and it all works fine.  This is not the case with the TopicConnectionFactory.  

The ClientID concept in a TopicConnectionFactory (that is, the unique ID for the subscription side of things) doesn't play nice across the Cluster if set at the Cluster level.  Essentially only one of the Nodes in the Cluster becomes the subscriber and receives messages where the other Nodes throw warnings that the subscription is in use.  (which is true)

To get around this, set the TopicConnectionFactory at the Node level, giving each one a unique ClientID.  All the rest of the settings can stay the same (JMS name, topic string, etc.).  A suggested format for the ClientID is [application].node.[number] to help you easily track and clean up subscriptions.

Remember, this is for an Active-Active cluster where each Node in it is Active and semi-autonomous (can handle their own processing independently).

Saturday, January 12, 2013

WebSphere MQ and DefaultMessageListenerContainer

WebSphere MQ and DefaultMessageListenerContainer

one of the joys of life is to work with the WebSphere environment.  one of the catches is working with the fantastic Spring Integration and the [insert your favorite expletive] WebSphere App Server.

here's a recent problem that i keep forgetting about; DefaultMessageListenerContainer doesn't play nice in the common WebSphere setup.  

so, the thing to remember is to set the following on your DefaultMessageListenerContainer;
- sessionTransacted = false
- cacheLevelName = CACHE_NONE

and you're good

Friday, June 22, 2012

Spring Integration, WebSphere App Server and WebSphere MQ


Problem

a strange behavior can occur when using WebSphere AppServer, WebSphere MQ and Spring Integration.  additional headers you add via Spring Integration header enrichment can 'fail' to appear once it's gone over the JMS wire via MQ.  this doesn't occur when using WebSphere MQ directly, only from the WebSphere container.  

Solution

so, the solution appears to be in the queue configuration in WebSphere AppServer, the default setting means that RFH2 Headers are not appended to the message.  though i'm not 100% on why this works, but when setting it to true, Spring Integration headers now work.

to find this in WebSphere V8 - go to the following

Resources > JMS > Queues > [your queue] > Advanced Properties

and check the box next to 

"Append RFH version 2 headers to messages sent to this destination"

it works - not exactly sure how...