activemq-artemis/docs/user-manual/en/vertx-integration.xml

116 lines
6.6 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================================= -->
<!-- Copyright © 2009 Red Hat, Inc. and others. -->
<!-- -->
<!-- The text of and illustrations in this document are licensed by Red Hat under -->
<!-- a Creative Commons AttributionShare Alike 3.0 Unported license ("CC-BY-SA"). -->
<!-- -->
<!-- An explanation of CC-BY-SA is available at -->
<!-- -->
<!-- http://creativecommons.org/licenses/by-sa/3.0/. -->
<!-- -->
<!-- In accordance with CC-BY-SA, if you distribute this document or an adaptation -->
<!-- of it, you must provide the URL for the original version. -->
<!-- -->
<!-- Red Hat, as the licensor of this document, waives the right to enforce, -->
<!-- and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent -->
<!-- permitted by applicable law. -->
<!-- ============================================================================= -->
<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % BOOK_ENTITIES SYSTEM "ActiveMQ_User_Manual.ent">
%BOOK_ENTITIES;
]>
<chapter id="vertx-integration">
<title>Vert.x Integration</title>
<para><ulink url="http://vertx.io/">Vert.x</ulink> 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 can now redirect and persist any vert.x messages
to ActiveMQ and route those messages to a specified vertx address by configuring ActiveMQ vertx incoming and outgoing
vertx connector services.
</para>
<section>
<title>Configuring a Vertx Incoming Connector Service</title>
<para>Vertx Incoming Connector services receive messages from vertx event bus and route them to a ActiveMQ queue.
Such a service can be configured as follows:</para>
<programlisting>
&lt;connector-service name="vertx-incoming-connector">
&lt;factory-class>org.apache.activemq.integration.vertx.VertxIncomingConnectorServiceFactory&lt;/factory-class>
&lt;param key="host" value="127.0.0.1"/>
&lt;param key="port" value="0"/>
&lt;param key="queue" value="jms.queue.vertxQueue"/>
&lt;param key="vertx-address" value="vertx.in.eventaddress"/>
&lt;/connector-service>
</programlisting>
<para>Shown are the required params for the connector service:</para>
<itemizedlist>
<listitem>
<para><literal>queue</literal>. The name of the ActiveMQ queue to send message to.</para>
</listitem>
</itemizedlist>
<para>As well as these required paramaters there are the following optional parameters</para>
<itemizedlist>
<listitem>
<para><literal>host</literal>. The host name on which the vertx target container is running. Default is localhost.</para>
</listitem>
<listitem>
<para><literal>port</literal>. The port number to which the target vertx listens. Default is zero.</para>
</listitem>
<listitem>
<para><literal>quorum-size</literal>. The quorum size of the target vertx instance.</para>
</listitem>
<listitem>
<para><literal>ha-group</literal>. The name of the ha-group of target vertx instance. Default is <literal>activemq</literal>.</para>
</listitem>
<listitem>
<para><literal>vertx-address</literal>. The vertx address to listen to. default is org.apache.activemq.</para>
</listitem>
</itemizedlist>
</section>
<section>
<title>Configuring a Vertx Outgoing Connector Service</title>
<para>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:</para>
<programlisting>
&lt;connector-service name="vertx-outgoing-connector">
&lt;factory-class>org.apache.activemq.integration.vertx.VertxOutgoingConnectorServiceFactory&lt;/factory-class>
&lt;param key="host" value="127.0.0.1"/>
&lt;param key="port" value="0"/>
&lt;param key="queue" value="jms.queue.vertxQueue"/>
&lt;param key="vertx-address" value="vertx.out.eventaddress"/>
&lt;param key="publish" value="true"/>
&lt;/connector-service>
</programlisting>
<para>Shown are the required params for the connector service:</para>
<itemizedlist>
<listitem>
<para><literal>queue</literal>. The name of the ActiveMQ queue to fetch message from.</para>
</listitem>
</itemizedlist>
<para>As well as these required paramaters there are the following optional parameters</para>
<itemizedlist>
<listitem>
<para><literal>host</literal>. The host name on which the vertx target container is running. Default is localhost.</para>
</listitem>
<listitem>
<para><literal>port</literal>. The port number to which the target vertx listens. Default is zero.</para>
</listitem>
<listitem>
<para><literal>quorum-size</literal>. The quorum size of the target vertx instance.</para>
</listitem>
<listitem>
<para><literal>ha-group</literal>. The name of the ha-group of target vertx instance. Default is <literal>activemq</literal>.</para>
</listitem>
<listitem>
<para><literal>vertx-address</literal>. The vertx address to put messages to. default is org.apache.activemq.</para>
</listitem>
<listitem>
<para><literal>publish</literal>. How messages is sent to vertx event bus. "true" means using publish style.
"false" means using send style. Default is false.</para>
</listitem>
</itemizedlist>
</section>
</chapter>