Red Hat Training

A Red Hat training course is available for Red Hat Fuse

Chapter 15. Creating a Consumer Endpoint

Abstract

A consumer is an endpoint that listens for messages, passes the messages to the NMR, and sends any response that maybe generated back to the external JMS endpoint. They are built using the Spring framework's JMS MessageListener interface.
Important
The Java Business Integration components of Red Hat JBoss Fuse are considered deprecated. You should consider migrating any JBI applications to OSGi.

15.1. Introduction to Consumer Endpoints

Where does a consumer fit into a solution?

Consumer endpoints play the role of consumer from the vantage point of the other endpoints in the ESB. As shown in Figure 15.1, “Consumer Endpoint”,consumer endpoints listen for messages on a JMS destination. When the message is received, the consumer endpoint passes it onto the NMR for delivery. If the JMS message is part of an in-out message exchange, the consumer endpoint will place that message into a reply destination for delivery to the originator of the JMS message.

Figure 15.1. Consumer Endpoint

consumer endpoint in a message exchange

Types of consumer endpoints

The JMS binding component offers three types of consumer endpoints:
Generic
The generic consumer endpoint can handle any type of message data. It is configured using the jms:consumer element.
SOAP
The SOAP consumer endpoint is specifically tailored to receive SOAP messages. It uses a WSDL document to define the structure of the messages. It is configured using the jms:soap-consumer element.
Tip
The Apache CXF binding component's JMS transport is better adapted to handling SOAP messages, but offers less control over the JMS connection.
JCA
The JCA consumer endpoint uses JCA to connect to the JMS provider. It is configured using the jms:jca-consumer element. For more information on using the JCA consumer endpoint, see Section 15.3, “Using the JCA Consumer Endpoint”.