Reputation: 11
After following item 29 of the https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.1/html/configuring_messaging/clusters_overview, redistribution test does not work.
Test Case: 1 jboss master and 2 jboss slaves. I created the "respostaCsu" queue in the artemis and posted a message on it. The message arrived on slave-1. This had no associated listeners for their correlationId and for this reason did not remove the message from the queue. The message should be forwarded to the next cluster machine (slave-2) according to the RedHat (redistribution-delay = 0 and message-load-balancing-type = ON_DEMAND) documentation. However the message was not redirected and remained in slave-1.
Any suggestion?
JBoss EAP 7.1 master domain.xml file:
...
<socket-binding-group name="full-ha-sockets" default-interface="public">
<socket-binding name="ajp" port="${jboss.ajp.port:8009}"/>
<socket-binding name="http" port="${jboss.http.port:8080}"/>
<socket-binding name="https" port="${jboss.https.port:8443}"/>
<socket-binding name="iiop" interface="unsecure" port="3528"/>
<socket-binding name="iiop-ssl" interface="unsecure" port="3529"/>
<socket-binding name="jgroups-mping" interface="private" port="0" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45700"/>
<socket-binding name="jgroups-tcp" interface="private" port="7600"/>
<socket-binding name="jgroups-udp" interface="private" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="modcluster" port="0" multicast-address="${jboss.modcluster.multicast.address:224.0.1.105}" multicast-port="23364"/>
<socket-binding name="txn-recovery-environment" port="4712"/>
<socket-binding name="txn-status-manager" port="4713"/>
<socket-binding name="messaging-group" interface="private" port="5432" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="9876"/>
<outbound-socket-binding name="mail-smtp">
<remote-destination host="localhost" port="25"/>
</outbound-socket-binding>
</socket-binding-group>
...
<subsystem xmlns="urn:jboss:domain:messaging-activemq:2.0">
<server name="default">
<security enabled="false"/>
<cluster user="mbuser" password="mbsenha"/>
<security-setting name="#">
<role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
</security-setting>
<address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10" redistribution-delay="0"/>
<address-setting name="jms.#" redistribution-delay="0"/>
<http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
<http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
<param name="batch-delay" value="50"/>
</http-connector>
<in-vm-connector name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-connector>
<http-acceptor name="http-acceptor" http-listener="default"/>
<http-acceptor name="http-acceptor-throughput" http-listener="default">
<param name="batch-delay" value="50"/>
<param name="direct-deliver" value="false"/>
</http-acceptor>
<in-vm-acceptor name="in-vm" server-id="0">
<param name="buffer-pooling" value="false"/>
</in-vm-acceptor>
<broadcast-group name="mb-broadcast-group" socket-binding="messaging-group" broadcast-period="2000" connectors="http-connector"/>
<discovery-group name="mb-discovery-group" socket-binding="messaging-group" refresh-timeout="10000"/>
<cluster-connection name="my-cluster" address="jms" connector-name="http-connector" use-duplicate-detection="false" message-load-balancing-type="ON_DEMAND" discovery-group="mb-discovery-group"/>
<jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
<jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
<jms-queue name="solicitacaoCsu" entries="java:/jms/queue/QL.REQ.BKLQ001Z" durable="false"/>
<jms-queue name="respostaCsu" entries="java:/jms/queue/QL.RSP.BKLQ001Z" durable="false"/>
<connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
<connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector" ha="true" block-on-acknowledge="true" reconnect-attempts="-1"/>
<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
</server>
</subsystem>
Upvotes: 0
Views: 723
Reputation: 11
Thank you all. But I found the solution! The problem was "messaging-group" tag in socket-binding! I configured port=0, multicast-addres to 231.7.7.7 and redistribution-delay to 0. It's works! =)
Here is my Jboss CLI:
/profile=full-ha/subsystem=messaging-activemq/server=default/broadcast-group=bg-group1:remove
/profile=full-ha/subsystem=messaging-activemq/server=default/discovery-group=dg-group1:remove
/socket-binding-group=full-ha-sockets/socket-binding=messaging-group:add(port=0,multicast-address=${jboss.messaging.group.address:231.7.7.7},multicast-port=${jboss.messaging.group.port:9876})
/socket-binding-group=full-ha-sockets/socket-binding=messaging-throughput:add(port=5455)
/profile=full-ha/subsystem=messaging-activemq/server=default/broadcast-group=bg-group1:add(socket-binding=messaging-group,broadcast-period=5000,connectors=[http-connector])
/profile=full-ha/subsystem=messaging-activemq/server=default/discovery-group=dg-group1:add(socket-binding=messaging-group,refresh-timeout=10000)
/profile=full-ha/subsystem=messaging-activemq/server=default/address-setting=#:write-attribute(name=redistribution-delay,value=0)
Upvotes: 0
Reputation: 35207
Redistribution doesn't support selectors. However, initial distribution does. Therefore you should create your consumer before you send the request so that the consumer is on the queue when the reply is sent.
Upvotes: 1