2014-12-11 07:17:29 -05:00
|
|
|
# Vert.x Integration
|
2014-12-04 10:25:29 -05:00
|
|
|
|
|
|
|
[Vert.x](http://vertx.io/) is a lightweight, high performance
|
|
|
|
application platform for the JVM that's designed for modern mobile, web,
|
|
|
|
and enterprise applications. Vert.x provides a distributed event bus
|
|
|
|
that allows messages to be sent across vert.x instances and clients. You
|
2015-03-03 11:12:34 -05:00
|
|
|
can now redirect and persist any vert.x messages to Apache ActiveMQ and route
|
|
|
|
those messages to a specified vertx address by configuring Apache ActiveMQ
|
2014-12-04 10:25:29 -05:00
|
|
|
vertx incoming and outgoing vertx connector services.
|
|
|
|
|
2014-12-11 07:17:29 -05:00
|
|
|
## Configuring a Vertx Incoming Connector Service
|
2014-12-04 10:25:29 -05:00
|
|
|
|
|
|
|
Vertx Incoming Connector services receive messages from vertx event bus
|
2015-03-03 11:12:34 -05:00
|
|
|
and route them to an Apache ActiveMQ queue. Such a service can be configured as
|
2014-12-04 10:25:29 -05:00
|
|
|
follows:
|
|
|
|
|
2014-12-11 07:17:29 -05:00
|
|
|
<connector-service name="vertx-incoming-connector">
|
|
|
|
<factory-class>org.apache.activemq.integration.vertx.VertxIncomingConnectorServiceFactory</factory-class>
|
|
|
|
<param key="host" value="127.0.0.1"/>
|
|
|
|
<param key="port" value="0"/>
|
|
|
|
<param key="queue" value="jms.queue.vertxQueue"/>
|
|
|
|
<param key="vertx-address" value="vertx.in.eventaddress"/>
|
|
|
|
</connector-service>
|
2015-02-25 08:37:19 -05:00
|
|
|
|
2014-12-04 10:25:29 -05:00
|
|
|
|
|
|
|
Shown are the required params for the connector service:
|
|
|
|
|
2015-03-03 11:12:34 -05:00
|
|
|
- `queue`. The name of the Apache ActiveMQ queue to send message to.
|
2014-12-04 10:25:29 -05:00
|
|
|
|
2015-01-21 13:46:15 -05:00
|
|
|
As well as these required parameters there are the following optional
|
2014-12-04 10:25:29 -05:00
|
|
|
parameters
|
|
|
|
|
|
|
|
- `host`. The host name on which the vertx target container is
|
|
|
|
running. Default is localhost.
|
|
|
|
|
|
|
|
- `port`. The port number to which the target vertx listens. Default
|
|
|
|
is zero.
|
|
|
|
|
|
|
|
- `quorum-size`. The quorum size of the target vertx instance.
|
|
|
|
|
|
|
|
- `ha-group`. The name of the ha-group of target vertx instance.
|
|
|
|
Default is `activemq`.
|
|
|
|
|
|
|
|
- `vertx-address`. The vertx address to listen to. default is
|
2015-01-21 13:46:15 -05:00
|
|
|
`org.apache.activemq`.
|
2014-12-04 10:25:29 -05:00
|
|
|
|
2014-12-11 07:17:29 -05:00
|
|
|
## Configuring a Vertx Outgoing Connector Service
|
2014-12-04 10:25:29 -05:00
|
|
|
|
|
|
|
Vertx Outgoing Connector services fetch vertx messages from a ActiveMQ
|
|
|
|
queue and put them to vertx event bus. Such a service can be configured
|
|
|
|
as follows:
|
|
|
|
|
2014-12-11 07:17:29 -05:00
|
|
|
<connector-service name="vertx-outgoing-connector">
|
|
|
|
<factory-class>org.apache.activemq.integration.vertx.VertxOutgoingConnectorServiceFactory</factory-class>
|
|
|
|
<param key="host" value="127.0.0.1"/>
|
|
|
|
<param key="port" value="0"/>
|
|
|
|
<param key="queue" value="jms.queue.vertxQueue"/>
|
|
|
|
<param key="vertx-address" value="vertx.out.eventaddress"/>
|
|
|
|
<param key="publish" value="true"/>
|
|
|
|
</connector-service>
|
2015-02-25 08:37:19 -05:00
|
|
|
|
2014-12-04 10:25:29 -05:00
|
|
|
|
|
|
|
Shown are the required params for the connector service:
|
|
|
|
|
2015-03-03 11:12:34 -05:00
|
|
|
- `queue`. The name of the Apache ActiveMQ queue to fetch message from.
|
2014-12-04 10:25:29 -05:00
|
|
|
|
|
|
|
As well as these required paramaters there are the following optional
|
|
|
|
parameters
|
|
|
|
|
|
|
|
- `host`. The host name on which the vertx target container is
|
|
|
|
running. Default is localhost.
|
|
|
|
|
|
|
|
- `port`. The port number to which the target vertx listens. Default
|
|
|
|
is zero.
|
|
|
|
|
|
|
|
- `quorum-size`. The quorum size of the target vertx instance.
|
|
|
|
|
|
|
|
- `ha-group`. The name of the ha-group of target vertx instance.
|
|
|
|
Default is `activemq`.
|
|
|
|
|
|
|
|
- `vertx-address`. The vertx address to put messages to. default is
|
|
|
|
org.apache.activemq.
|
|
|
|
|
|
|
|
- `publish`. How messages is sent to vertx event bus. "true" means
|
|
|
|
using publish style. "false" means using send style. Default is
|
|
|
|
false.
|
|
|
|
|
|
|
|
|