HornetQ Deploying a Distributed Topic: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 26: Line 26:


=Configure the Cluster Connection on All Nodes=
=Configure the Cluster Connection on All Nodes=
<blockquote style="background-color: Gold; border: solid thin Goldenrod;">
:Cluster connections are unidirectional. For bi-directional propagation of messages between two nodes, two different cluster connections must be established between those two nodes, in both directions.<br>
</blockquote>


Deploy the cluster connection that will distribute topic messages among nodes:
Deploy the cluster connection that will distribute topic messages among nodes:
Line 31: Line 36:
<pre>
<pre>
</pre>
</pre>
<blockquote style="background-color: Gold; border: solid thin Goldenrod;">
:Cluster connections are unidirectional. For bi-directional propagation of messages between two nodes, two different cluster connections must be established between those two nodes, in both directions.<br>
</blockquote>

Revision as of 02:10, 25 May 2016

Internal

Overview

This article explains how to deploy a distributed topic - meaning that messages are internally distributed amongst the HornetQ nodes that have the topic deployed on them. The underlying cluster connection that does the internal message distribution is configured to only handle messages destined to the specific topic we're distributing, maintaining all other destinations isolated.

The example assumes three nodes (n1, n2 and n3).

Deploy the Topic on All Nodes

Deploy the topic on all nodes. Use the usual declaration:

<jms-destinations>
  ...
  <jms-topic name="novaordis">
    <entry name="topic/novaordis"/>
    <entry name="java:jboss/exported/topic/novaordis"/>
  </jms-topic>
</jms-destinations>

At this point, the topic is deployed locally on all three nodes. Topic subscriptions will only receive messages sent to the topic on the node the subscription was established on.

Configure the Cluster Connection on All Nodes

Cluster connections are unidirectional. For bi-directional propagation of messages between two nodes, two different cluster connections must be established between those two nodes, in both directions.


Deploy the cluster connection that will distribute topic messages among nodes: