Competing Consumers - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

Camel supports the Competing Consumers from the EIP patterns using a few different components.

You can use the following components to implement competing consumers:-

  • Camel Component: SEDA for SEDA based concurrent processing using a thread pool

  • Camel Component: JMS for distributed SEDA based concurrent processing with queues which support reliable load balancing, failover and clustering.

To enable Competing Consumers with JMS you just need to set the concurrentConsumers property on the Camel Component: JMS endpoint.

For example

from("jms:MyQueue?concurrentConsumers=5").bean(SomeBean.class);

Or in Spring DSL:

<route>
   <from uri="jms:MyQueue?concurrentConsumers=5"/>
   <to uri="bean:someBean"/>
</route>

Or just run multiple JVMs of any Camel Component: ActiveMQ or Camel Component: JMS route.