You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

Asynchronous Routing Engine

Available as of Camel 2.4

As of Camel 2.4 the asynchronous routing engine is back and kicking.
All the Enterprise Integration Patterns is supported as well a selected number of Components:

  • AHC Camel 2.8: (only producer)
  • Avro Camel 2.10: (only producer)
  • CXF Camel 2.5: (both consumer and producer)
  • CXFRS Camel 2.5: (only consumer)
  • Guava EventBus Camel 2.10: (only consumer)
  • JBI (both consumer and producer)
  • Jetty (both consumer and producer)
  • JGroups Camel 2.10: (only consumer)
  • JMS Camel 2.5: (only producer for Request Reply messaging over JMS). Camel 2.9: (consumer, if option asyncConsumer=true is used).
  • JMS Camel 2.9: (also consumer)
  • MQTT Camel 2.10.2: (only producer)
  • NMR (both consumer and producer)
  • Netty only producer (Camel 2.10: also consumer)
  • Restlet Camel 2.8: (only producer)
  • SEDA (both consumer and producer)

When we say a component is supported, that means, the component is leveraging the asynchronous model. For example Jetty uses continuations and the async http client to be fully asynchronous and non blocked. That means no threads will ever be blocked while waiting for a reply.

In the future additional Components will be supported as well where it's applicable.

Forcing to use synchronous processing

You can configure the endpoints with the option synchronous=true to force using synchronous processing. For example when sending a web service request using CXF, the caller will wait for the reply, if synchronous=true was configured. Currently this option is supported by the all the producers. If you don't want to let the CXF consumer leverage the CXF continuation API to use the asynchronous processing, you can also use this option synchronous=true to disable it. The JBI and NMR component is always asynchronous and doesn't support this option.

Background information

See Asynchronous Processing for additional information and the concepts behind the asynchronous model.

  • No labels