Duplicate instances for AQ adapters in a cluster environment

Deploying a SOA composite application in a cluster environment could bring up issues you might not have captured at design time. One of this issues relates to the use of the AQ adapter to dequeue messages and start application instances.

When testing the app on your local development environment (non-clustered) everything might seem alright. Once you deploy your app on the clustered test environment (a cluster with more than one managed server for SOA) and start testing, you’ll notice that for each AQ message you get multiple instances (the number depends on the number of managed servers in the cluster).

The fix, for preventing multiple instances being created for the same AQ message, is to add two binding parameters in your composite.xml file – see the example below.

<binding.jca config="ServiceAQAdapter.jca">
  <property name="singleton" type="xs:boolean" many="false" override="may">true</property>
  <property name="activationInstances" type="xs:integer" many="false" override="may">1</property> </binding.jca>

Leave a Comment

Your email address will not be published. Required fields are marked *