Service Activator

Camel supports the Service Activator from the EIP patterns book.

How can an application design a service to be invoked both via various messaging technologies and via non-messaging techniques?


Design a Service Activator that connects the messages on the channel to the service being accessed.

Camel has several endpoint components that support the Service Activator from the EIP patterns.

Components like Bean and CXF provide a way to bind the message exchange to a Java interface/service where the route defines the endpoints and wires it up to the bean.

In addition you can use the Bean Integration to wire messages to a bean using annotation.


Here is a simple example of using a Direct endpoint to create a messaging interface to a POJO Bean service.

Using Java DSL


Using the XML DSL

  <from uri="direct:invokeMyService"/>
  <to uri="bean:myService"/>