cMessagingEndpoint
Commonly used Camel components
The following table lists the most commonly used Camel components that
can be called by cMessagingEndpoint. Click the links in the table to go to the Apache
Camel’s Website for the latest information of the these components. Make sure to
use the information applicable for the Camel Version included in Talend ESB. See also
Talend ESB Mediation Developer Guide for details of the
Camel components.
Component / ArtifactId / URI |
Description |
---|---|
AHC
|
To call external HTTP services using Async Http Client. |
AHC
|
To exchange data with external Websocket servers using |
APNS
|
For sending notifications to Apple iOS |
Avro
|
Working with Apache Avro for data |
Atom
|
For consuming Atom RSS feeds. |
Atmosphere
|
To exchange data with external Websocket clients using |
Braintree
|
For integrating with the Braintree Payment System. |
Camel
|
To send/receive messages between Camel routes in a |
CMIS
|
The cmis component uses the Apache |
CoAP
|
For sending and receiving messages from COAP capable devices. |
CouchDB
|
To integrate with CouchDB databases. |
Crypto (JCE)
|
For signing and verifying exchanges using |
CXF
|
Works for SOAP WebServices using Apache |
Disruptor
|
To provide asynchronous SEDA behavior |
EHCache
|
To perform caching operations using EHCache as the |
Elasticsearch (camel-elasticsearch)
|
For interfacing with ElasticSearch |
ElSQL
|
The ElSQL component is an extension to the existing SQL Component that uses ElSql to define the SQL queries. |
etcd
|
To work with Etcd, a distributed reliable key-value |
Exec
|
To execute OS system commands. |
Facebook
|
To provide access to all of the Facebook |
Flatpack
|
The flatpack component supports fixed |
FOP
|
To render a message into different output |
Freemarker
|
Transforms the message using a FreeMarker |
FTP
|
For uploading or downloading files from |
Geocoder
|
For looking up geocodes (latitude and |
Git
|
For working with git repositories. |
Guava
|
Provides integration bridge between Camel |
Grape
|
To fetch, load and manage additional jars when |
HBase
|
For reading/writing from/to an HBase |
HDFS
|
For reading/writing from/to an HDFS file |
HDFS2
|
For reading/writing from/to an HDFS file |
HTTP4
|
For calling out to external HTTP servers |
Ignite Cache
|
The Ignite Cache endpoint is one of camel-ignite |
Infinispan
|
For reading/writing from/to Infinispan |
IronMQ
|
The ironmq provides integration with IronMQ an elastic |
JBPM
|
Provides integration with jBPM (Business Process |
JCache
|
To perform caching operations using JSR107/JCache as |
JCR
|
To add/read nodes to/from a JCR |
JDBC
|
To access databases through JDBC where |
Jetty 9
|
Provides HTTP-based endpoints for consuming and |
JGroups
|
Provides exchange of messages between |
JMS
|
Allows messages to be sent to, or |
JMX
|
To receive JMX notifications. |
JOLT
|
To process JSON messages using an JOLT specification |
JPA
|
To store and retrieve Java objects from |
Jsch
|
To copy files using the secure copy protocol (SCP). |
Kafka
|
Allows messages to be sent to, or |
Krati
|
Allows the use of krati datastores and |
Kubernetes
|
To work with Kubernetes PaaS. |
Lucene
|
To insert or query from Apache Lucene |
Mail
|
To send or receive emails using imap/pop3 or smtp |
Mina2
|
Socket level networking using TCP or UDP |
MLLP
|
Provides functionality required by Healthcare providers |
Mock
|
For testing routes and mediation rules |
MongoDB
|
For working with documents stored in |
MongoDB
|
For working with MongoDB GridFS. |
MQTT
|
For communicating with MQTT M2M message |
Mustache
|
Transforms the message using a Mustache |
MyBatis
|
Performs a query, poll, insert, update |
Nats
|
Produces and consumes messages from NATS. |
Netty
|
Socket level networking using TCP or UDP |
OpenShift
|
To Manage your Openshift 2.x applications. This |
OptaPlanner
|
Solves the planning problem contained |
Paho
|
For communicating with MQTT M2M message brokers using |
PDF
|
Provides the ability to create, modify or extract |
Quartz
|
Provides a scheduled delivery of |
Quartz2
|
Provides a scheduled delivery of |
RabbitMQ
|
To produce and consume messages from |
RMI
|
For invoking Java RMI beans from |
RSS
|
For consuming RSS feeds. |
Salesforce
|
For integrating Camel with the massive |
SAP
|
To integrate with the SAP NetWeaver |
Servlet
|
To use a HTTP Servlet as entry for Camel |
Simple JMS
|
Allows messages to be sent to, or |
Slack
|
To send messages to Slack. |
SMPP
|
To send and receive SMS using a SMSC |
SNMP
|
To poll SNMP capable devices or |
Solr
|
To interface with an Apache Lucene Solr |
Splunk
|
To publish or search for events in |
Spring Batch
|
To send messages to Spring Batch for |
Spring
|
Bridges Camel with Spring |
Spring LDAP
|
To perform searches in LDAP servers |
Spring Redis
|
To send and receive messages from |
Spring
|
Works for SOAP WebServices using Spring |
SQL
|
To work with databases using JDBC SQL |
SSH
|
The ssh component enables access to SSH |
StAX
|
Allows messages to be process through a |
Stomp
|
For communicating with Stomp compliant |
Twitter
|
Integrates with Twitter to send tweets or search for tweets and more. |
Undertow
|
Provides HTTP-based endpoints for consuming and |
Velocity
|
Transforms the message using a Velocity |
Vertx
|
For sending and receive messages from a |
Weather
|
Polls the weather information from Open |
Yammer
|
To interact with the Yammer enterprise |
ZooKeeper
|
Allows interaction with a ZooKeeper |
Configuring connection to the WebSphere MQ native server using the WMQ
component
When using the cMessagingEndpoint to address an
endpoint in a WebSphere MQ native server by calling WMQ, the connection to the MQ QueueManager can be configured in the URI
field or in a properties file. The following properties can be configured:
-
queueManagerName
: The name of the MQ QueueManager. If not
specified, the component falls back todefault
. -
queueManagerHostname
: The hostname of the MQ
QueueManager. -
queueManagerPort
: The port of the MQ QueueManager. -
queueManagerChannel
: The channel of the MQ
QueueManager. -
queueManagerUserID
: The user ID (optional, only required for
authentication). -
queueManagerPassword
: The user password (optional, only
required for authentication). -
queueManagerCCSID
: The CCSID (optional, only required for
authentication).
If the queueManagerHostname
, queueManagerPort
,
and queueManagerChannel
is not specified in the URI, the component loads a
mq.properties
file from the classloader. An example of a
mq.properties
shown as follows:
1 2 3 |
default.hostname=localhost default.port=7777 default.channel=QM_TEST.SVRCONN |
The mq.properties
can contain multiple MQ Queue Managers definition. The
format is:
1 2 3 |
name.hostname name.port name.channel |
where the name
is the QueueManager name. For example, the
mq.properties
file can contain:
1 2 3 4 5 6 |
default.hostname=localhost default.port=7777 default.channel=DEFAULT.SVRCONN test.hostname=localhost test.port=7778 test.channel=QM_TEST.SVRCONN |
The mq.properties
also supports the userID
,
password
, and CCSID
properties. For example:
1 2 3 4 5 6 |
default.hostname=localhost default.port=7777 default.channel=DEFAULT.SVRCONN default.userID=mqm default.password=mqm default.CCSID=1208 |
To call the mq.properties
, use a cConfig component and add it
to the Dependencies table. To run the Route with this component in the studio,
you need to download the com.ibm.mq.jar,
com.ibm.mq.commonservices.jar,
com.ibm.mq.headers.jar,
com.ibm.mq.jmqi.jar and connector.jar from
the IBM web site and add them to the Dependencies list
of the cConfig too. For more information about the
cConfig component, see cConfig.
If the Route with this component is deployed in Runtime, the
mq.properties
file will be called from
<TalendRuntimePath>/container/etc
folder. Furthermore, you need to
download com.ibm.mq.osgi.java_7.5.0.5.jar from the IBM web site and
add it to the <TalendRuntimePath>/container/deploy
folder.
Alternatively, copy the com.ibm.mq.jar,
com.ibm.mq.commonservices.jar,
com.ibm.mq.headers.jar,
com.ibm.mq.jmqi.jar and connector.jar to
the <TalendRuntimePath>/container/lib/ext
folder and change
<TalendRuntimePath>/container/etc/custom.properties
by adding the
MQ packages to org.osgi.framework.system.packages.extra
:
1 2 3 4 5 6 7 8 9 |
org.osgi.framework.system.packages.extra = com.ibm.mq; com.ibm.mq.constants; com.ibm.mq.exits; com.ibm.mq.headers; com.ibm.mq.headers.pcf; com.ibm.mq.jmqi; com.ibm.mq.pcf; ... |
For more information about the WMQ component, see the site https://github.com/camel-extra/camel-extra/tree/master/components/camel-wmq.
You can also use the cMQConnectionFactory component
to create a connection to the WebSphere MQ native server, and use the cWMQ to communicate with the MQ QueueManager. For more
information, see cMQConnectionFactory and cWMQ.
cMessagingEndpoint Standard properties
These properties are used to configure cMessagingEndpoint running in the Standard Job framework.
The Standard
cMessagingEndpoint component belongs to the Core family.
Basic settings
URI |
URI of the messages to send or receive. It can be of different -File: “file:/”, -Database: “jdbc:/”, -Protocols: “ftp:/”, “http:/” -etc. You can add parameters to the URI using the generic URI syntax,
For more information on the different components that can be used |
Advanced settings
Dependencies |
By default, the camel core supports the following components: To use other components, you have to provide the dependencies Click the plus button to add new lines in the Camel component list. In the line added, |
Use a custom component |
If you want to use a custom component, select this check box and Note:
All the transitive dependencies of this custom component |
Usage
Usage rule |
This component can be used as sending and/or receiving message |
Limitation |
n/a |
Scenario 1: Moving files from one message endpoint to another
This scenario applies only to a Talend solution with ESB.
This scenario uses two cMessagingEndpoint components
to read and move files from one endpoint to another.
Dropping and linking the components
-
From the Core folder of the Palette, drag and drop two cMessagingEndpoint components onto the design workspace, one
as the message sender and the other as the message receiver, and label them
Sender and Receiver respectively to better identify their roles in the
Route. -
Right-click the component labeled Sender, select Row >
Route in the menu and drag to the
Receiver to link them together with a
route link.
Configuring the components and connections
-
Double-click the component labeled Sender to open its Basic
settings view in the Component tab. -
In the URI field, type in the URI of the
messages you want to route.As we are handling files, type in “file:///” and the
path to the folder containing the files. -
Double-click the component labeled Receiver to open its Basic
settings view in the Component tab. -
In the URI field, type in the URI of the
folder where you want to route your message.As we are handling files, type in “file:///” and the
path to the folder to which the files will be sent. - Press Ctrl+S to save your Route.
Viewing code and executing the Route
-
To have a look at the generated code, click the Code tab at the bottom of the design workspace.
The code shows the
from
and.to
corresponding to
the two endpoints:from
for the sending one and
.to
for the receiving one. -
In the Run view, click the Run button to launch the execution of your Route.
You can also press F6 to execute it.RESULT: The files are moved from their original folder to the target one.
Furthermore, a new .camel folder is created
in the source folder containing the consumed files. This is Camel’s default
behavior. Thus, the files will not be processed endlessly but they are
backed up in case of problems.
Scenario 2: Sending files to another message endpoint
This scenario applies only to a Talend solution with ESB.
This scenario accesses FTP service and transfers files from one endpoint to
another.
Dropping and linking components
-
From the Core folder of the Palette, drag and drop two cMessagingEndpoint components onto the design workspace, one
as the message sender and the other as the message receiver, and label them
Sender and Receiver respectively to better identify their roles in the
Route. -
Right-click the component labeled Sender, select Row >
Route in the menu and drag to the
Receiver to link them together with a
route link.
Configuring the components and connections
-
Double-click the component labeled Sender to display its Basic
settings view in the Component tab. -
In the URI field, type in the URI of the
message you want to route.Here, we are using an FTP component:
ftp://indus@degas/remy/camel
with URI specific parameters
authenticating the FTP connection:
?username=indus&password=indus
. -
For the FTP component to work in Camel, click the Advanced settings tab of cMessagingEndpoint, click the [+] button to add a Camel component in the Dependencies table, and select
ftp from the Camel
component list to activate the FTP component. -
Double-click the component labeled Receiver to open its Basic
settings view in the Component tab. -
In the URI field, type in the URI of the
folder to which you want your message to be routed.As we are handling files, type in “file:///” and the
path to the folder to which the files will be sent. - Press Ctrl+S to save your Route.
Viewing code and executing the Route
-
To have a look at the generated code, click the Code tab at the bottom of the design workspace.
In this part of code, we can see a route represented by
from
and.to
, corresponding to the sending and receiving
endpoints. -
In the Run view, click the Run button to launch the execution of your Route.
You can also press F6 to execute it.RESULT: The message is sent (copied) to the receiving endpoint.
Scenario 3: Using an Xquery endpoint to filter messages
This scenario applies only to a Talend solution with ESB.
In this scenario, we will use a cMessagingEndpoint
component to call a Route Resource as an Xquery parser to extract messages from the
local file system.
The following sample XML file is used in this scenario:
1 2 3 4 5 6 7 8 9 10 11 12 |
<people> <person id="8"> <firstName>Ellen</firstName> <lastName>Ripley</lastName> <city>Washington</city> </person> <person id="9"> <firstName>Peter</firstName> <lastName>Green</lastName> <city>London</city> </person> </people> |
Creating a Route Resource
-
From the repository tree view, right-click the Resources node and select Create
Resource from the context menu. -
The [New Route Resource] wizard opens. In
the Name field, type in a name for the
Resource, for example, SampleXquery. Click Finish to close the wizard. -
Enter the following code in the editor to extract the
firstName and lastName of all
the person elements.1234567891011declare namespace ns0="http://com.sap/b";<people>{for $p in /people//personreturn<person><firstName>{$p/firstName/text()}</firstName><lastName>{$p/lastName/text()}</lastName></person>}</people> -
Press Ctrl+S to save your Route
Resource.
Dropping and linking the components
-
From the Connectivity folder of the
Palette, drag and drop a cFile and a cMessagingEndpoint component onto the design
workspace. -
From the Custom folder, drag and drop a
cProcessor component onto the design
workspace. -
Link the components with the Row >
Route connection as shown above. -
Label the components for better identification of their
functionality.
Configuring the components and connections
-
Double-click the cFile component to open
its Basic settings view in the Component tab. -
In the Path field, specify the path where
the source file people.xml is located. -
Right-click the Route from the repository tree view and select Manage Route Resources from the context
menu.The [Manage Route Resources] wizard is
opened. -
In the [Manage Route Resources] wizard,
click Add and select SampleXquery from the Resources tree view in
the dialog. Click OK.The SampleXquery Route Resource is
added in the table of the [Manage Route
Resources] wizard. -
Select the SampleXquery from the Route
Resources list and click Copy Path. Click
OK to close the wizard. -
Double click the cMessagingEndpoint
component to display its Basic settings
view in the Component tab. -
In the URI field, enter xquery: and paste the path of the Route
Resource SampleXquery that we just copied
in double quotation marks. -
Click the Advanced settings tab, add the
Camel component saxon in the Dependencies list. For more information about
Xquery, see Apache Camel’s Website:
http://camel.apache.org/xquery-endpoint.html. -
Double-click the cProcessor component to
open its Basic settings view in the
Component tab. -
In the Code area, enter the following
code to display the messages intercepted on the console:1System.out.println(exchange.getIn().getBody(String.class)); - Press Ctrl+S to save your Route.
Viewing code and executing the Route
-
To have a look at the generated code, click the Code tab at the bottom of the design workspace.
As shown in the code above, the message is routed
from
Message_source_cFile_1
.to
cMessagingEndpoint_1
and then processed by
cProcessor_1
. -
In the Run view, click the Run button to launch the execution of your Route.
You can also press F6 to execute it.RESULT: The firstName and
lastName of all the person
elements of the source file is printed in the console.