concept endpoint in category esb

appears as: n endpoint, endpoints, endpoint, endpoint, endpoints, The endpoint
Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix

This is an excerpt from Manning's book Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix.

Starting with Mule 2.0, the configuration of endpoints has become easier with the introduction of transport-specific namespaces and attributes. For instance, when we look at the JMS endpoint configuration from the previous section, we can also configure it with an endpoint specific to the JMS transport in Mule 2.0. It would look like this:

<jms:inbound-endpoint queue="order.queue"/>
<jms:outbound-endpoint topic="order.topic"/>

The main advantage is that you get code completion for the configuration of an endpoint related to a specific transport. This also makes it simpler to determine which properties you can use for an endpoint of a specific transport. Because this style of configuring endpoints is more powerful, we use the transport-specific namespaces in this book.

Another important difference is the use of inbound-endpoint and outbound-endpoint elements in Mule 2.0 instead of the endpoint element in Mule 1.4. This means that the inbound and outbound endpoint definitions are clearly separated and that the attributes and child elements for these endpoint definitions can be different. Let’s look at a couple of examples of more complex endpoint definitions, to be able to compare them with the Mule 1.4 complex endpoints of the previous section:

You’ve seen in the previous section that endpoints are an important part of the Mule configuration. Configuring transformers is also partly done using those endpoints. It consists of two steps. The first step is to define the transformers and assign a logical name. The XML configuration to define the transformers is shown in listing 2.1.

The service unit JAR file, including the xbean.xml configuration, can be deployed to a JBI component, which will use the information configured in the service unit to create new services and register endpoints to those services. The XML data shown in listing 2.5 shows a complete xbean.xml file that can be deployed as part of a service unit to the servicemix-file binding component.

Listing 2.5. Sample XBean configuration for the ServiceMix file BC

This configuration will create a new service in the file BC with the service name esb:poller . It will also make the file BC register an endpoint with the name pollerEndpoint, through which the service can be invoked . This service endpoint combination must be unique inside the JBI container. After this service unit is deployed, it will be started and will monitor the inbox directory for files ; it will poll every 10 seconds . Once a file is found there, it’s picked up and sent as an InOnly message exchange to the service and endpoint specified as target service and target endpoint.

2.2.2. Services and endpoints

The following is a high-level summary of services and endpoints. This should help you grasp these concepts without having to dive too deep into the JBI specification.