0 Replies Latest reply on Feb 17, 2016 9:06 AM by bpietraszuk

    JBoss EAP in full-ha profile - not replicated messages

    bpietraszuk Newbie

      Hi all,

       

      could you please explain me how to configure hornetq server in full-ha profile to get local queues? I would like to send message to the node and consume it in the same node.

      For example, I have two nodes: A and B. I send message to queue on node A. Node A consumes this message. Now, because of replication, node B can consume this message, too. As I know Jgroups replcate message to make it available on other nodes. Can I disable this functionality?

       

      My configuration:

      <subsystem xmlns="urn:jboss:domain:messaging:1.4">

          <hornetq-server>

              <clustered>false</clustered>

              <persistence-enabled>true</persistence-enabled>

              <security-domain>other</security-domain>

              <security-enabled>false</security-enabled>

              <journal-type>NIO</journal-type>

              <journal-min-files>2</journal-min-files>

       

              <connectors>

                  <netty-connector name="netty" socket-binding="messaging" />

                  <netty-connector name="netty-throughput"

                      socket-binding="messaging-throughput">

                      <param key="batch-delay" value="50" />

                  </netty-connector>

                  <in-vm-connector name="in-vm" server-id="0" />

              </connectors>

       

              <acceptors>

                  <netty-acceptor name="netty" socket-binding="messaging" />

                  <netty-acceptor name="netty-throughput"

                      socket-binding="messaging-throughput">

                      <param key="batch-delay" value="50" />

                      <param key="direct-deliver" value="false" />

                  </netty-acceptor>

                  <in-vm-acceptor name="in-vm" server-id="0" />

              </acceptors>

       

              <security-settings>

                  <security-setting match="jms.#">

                      <permission type="send" roles="guest agent user" />

                      <permission type="consume" roles="guest agent user" />

                      <permission type="createDurableQueue" roles="guest agent user" />

                      <permission type="deleteDurableQueue" roles="guest agent user" />

                      <permission type="createNonDurableQueue" roles="guest agent user" />

                      <permission type="deleteNonDurableQueue" roles="guest agent user" />

                  </security-setting>

              </security-settings>

       

              <address-settings>

                  <address-setting match="#">

                      <dead-letter-address>jms.queue.DLQ</dead-letter-address>

                      <expiry-address>jms.queue.ExpiryQueue</expiry-address>

                      <redelivery-delay>0</redelivery-delay>

                      <max-size-bytes>10485760</max-size-bytes>

                      <page-size-bytes>2097152</page-size-bytes>

                      <address-full-policy>PAGE</address-full-policy>

                      <message-counter-history-day-limit>10</message-counter-history-day-limit>

                  </address-setting>

              </address-settings>

       

              <jms-connection-factories>

                  <connection-factory name="InVmConnectionFactory">

                      <connectors>

                          <connector-ref connector-name="in-vm" />

                      </connectors>

                      <entries>

                          <entry name="java:/ConnectionFactory" />

                      </entries>

                  </connection-factory>

                  <connection-factory name="RemoteConnectionFactory">

                      <connectors>

                          <connector-ref connector-name="netty" />

                      </connectors>

                      <entries>

                          <entry name="java:jboss/exported/jms/RemoteConnectionFactory" />

                      </entries>

                      <ha>true</ha>

                      <block-on-acknowledge>true</block-on-acknowledge>

                      <retry-interval>1000</retry-interval>

                      <retry-interval-multiplier>1.0</retry-interval-multiplier>

                      <reconnect-attempts>-1</reconnect-attempts>

                  </connection-factory>

                  <pooled-connection-factory name="hornetq-ra">

                      <transaction mode="xa" />

                      <connectors>

                          <connector-ref connector-name="in-vm" />

                      </connectors>

                      <entries>

                          <entry name="java:/JmsXA" />

                      </entries>

                  </pooled-connection-factory>

              </jms-connection-factories>

       

              <jms-destinations>

                  <jms-queue name="test1.in">

                      <entry name="java:jboss/exported/jms/queue/test1.in" />

                      <durable>true</durable>

                  </jms-queue>       

              </jms-destinations>

          </hornetq-server>

      </subsystem>