Conflating a Multi-Site Gateway Queue

Conflating your gateway queues improves distribution performance. When conflation is enabled, only the latest enqueued value is sent for a particular key.

Note: Do not use conflation if your receiving applications depend on the specific ordering of entry modifications or if they need to be notified of every change.
Conflation is particularly useful when a single entry is updated often and all the individual updates don’t require processing by the other sites. When an update is being added to a queue that has conflation enabled, if there is already an update message in the queue for the entry key, the existing message assumes the value of the new update and the new update is dropped, as shown here for key A.



Note: This method of conflation is different from the one used for server-to-client subscription queue conflation and peer-to-peer distribution within a distributed system.

Enable conflation using one of the following:

XML:
<gateway id="EU"> 
    <gateway-queue batch-conflation="true"/> 
</gateway> 
Java:
// Create the Gateway Hub 
    GatewayHub usHub = ... 
// Add the EU gateway 
    Gateway euGateway = usHub.addGateway("EU"); 
// Create the EU queue attributes GatewayQueueAttributes 
    euQueueAttributes = new GatewayQueueAttributes();
    euQueueAttributes.setBatchConflation(true); 
    euGateway.setQueueAttributes(euQueueAttributes); 

Entry updates in the current in-process batch are not eligible for conflation.