forked from hornetq/hornetq
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request hornetq#1552 from gaohoward/andy_vertx_master
vertx integration
- Loading branch information
Showing
21 changed files
with
2,603 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<?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 Attribution–Share 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 "HornetQ_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 HornetQ and route those messages to a specified vertx address by configuring HornetQ 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 HornetQ queue. | ||
Such a service can be configured as follows:</para> | ||
<programlisting> | ||
<connector-service name="vertx-incoming-connector"> | ||
<factory-class>org.hornetq.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> | ||
</programlisting> | ||
<para>Shown are the required params for the connector service:</para> | ||
<itemizedlist> | ||
<listitem> | ||
<para><literal>queue</literal>. The name of the HornetQ 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>hornetq</literal>.</para> | ||
</listitem> | ||
<listitem> | ||
<para><literal>vertx-address</literal>. The vertx address to listen to. default is org.hornetq.</para> | ||
</listitem> | ||
</itemizedlist> | ||
</section> | ||
|
||
<section> | ||
<title>Configuring a Vertx Outgoing Connector Service</title> | ||
<para>Vertx Outgoing Connector services fetch vertx messages from a HornetQ queue and put them to vertx event bus. | ||
Such a service can be configured as follows:</para> | ||
<programlisting> | ||
<connector-service name="vertx-outgoing-connector"> | ||
<factory-class>org.hornetq.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> | ||
</programlisting> | ||
<para>Shown are the required params for the connector service:</para> | ||
<itemizedlist> | ||
<listitem> | ||
<para><literal>queue</literal>. The name of the HornetQ 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>hornetq</literal>.</para> | ||
</listitem> | ||
<listitem> | ||
<para><literal>vertx-address</literal>. The vertx address to put messages to. default is org.hornetq.</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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.hornetq.examples.core</groupId> | ||
<artifactId>core-examples</artifactId> | ||
<version>2.5.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>hornetq-vertx-example</artifactId> | ||
<packaging>jar</packaging> | ||
<name>HornetQ Vert.x Example</name> | ||
|
||
<properties> | ||
<vertx.version>2.1RC1</vertx.version> | ||
</properties> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-server</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-core-client</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-commons</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-all</artifactId> | ||
<version>${netty.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.javaee</groupId> | ||
<artifactId>jboss-jms-api</artifactId> | ||
<version>1.1.0.GA</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.naming</groupId> | ||
<artifactId>jnp-client</artifactId> | ||
<version>5.0.5.Final</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.spec.javax.jms</groupId> | ||
<artifactId>jboss-jms-api_2.0_spec</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-core</artifactId> | ||
<version>${vertx.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-platform</artifactId> | ||
<version>${vertx.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-hazelcast</artifactId> | ||
<version>${vertx.version}</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>start</id> | ||
<goals> | ||
<goal>start</goal> | ||
</goals> | ||
<configuration> | ||
<systemProperties> | ||
<property> | ||
<name>build.directory</name> | ||
<value>${basedir}/target/</value> | ||
</property> | ||
</systemProperties> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>runClient</id> | ||
<goals> | ||
<goal>runClient</goal> | ||
</goals> | ||
<configuration> | ||
<clientClass>org.hornetq.core.example.VertxConnectorExample</clientClass> | ||
</configuration> | ||
</execution> | ||
<execution> | ||
<id>stop</id> | ||
<goals> | ||
<goal>stop</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.hornetq.examples.core</groupId> | ||
<artifactId>hornetq-vertx-example</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-vertx-integration</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-core-client</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-server</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-jms-client</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hornetq</groupId> | ||
<artifactId>hornetq-jms-server</artifactId> | ||
<version>${project.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.netty</groupId> | ||
<artifactId>netty-all</artifactId> | ||
<version>${netty.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.javaee</groupId> | ||
<artifactId>jboss-jms-api</artifactId> | ||
<version>1.1.0.GA</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jboss.naming</groupId> | ||
<artifactId>jnpserver</artifactId> | ||
<version>5.0.3.GA</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-core</artifactId> | ||
<version>${vertx.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-platform</artifactId> | ||
<version>${vertx.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.vertx</groupId> | ||
<artifactId>vertx-hazelcast</artifactId> | ||
<version>${vertx.version}</version> | ||
</dependency> | ||
</dependencies> | ||
<configuration> | ||
<waitOnStart>false</waitOnStart> | ||
<hornetqConfigurationDir>${basedir}/target/classes/server0</hornetqConfigurationDir> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
|
||
</project> |
Oops, something went wrong.