-
1. Re: MDB configuration to connect to clustered JMS topic
jbertram Aug 1, 2012 10:02 AM (in response to hgupta)1 of 1 people found this helpfulHow about using discovery? Something like this on your MDB:
@ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.hornetq.core.remoting.impl.netty.NettyConnectorFactory"), @ActivationConfigProperty(propertyName = "reconnectAttempts", propertyValue = "-1"), @ActivationConfigProperty(propertyName = "setupAttempts", propertyValue = "-1"), @ActivationConfigProperty(propertyName = "discoveryAddress", propertyValue = "231.7.7.7"), @ActivationConfigProperty(propertyName = "discoveryPort", propertyValue = "9876")})
-
2. Re: MDB configuration to connect to clustered JMS topic
hgupta Aug 1, 2012 5:50 PM (in response to jbertram)Hi Justin,
Thanks a lot for the response. Using the discovery address, my MDB is able to connect to the cluster and listen for JMS messages.
But I am seeing one problem - if I start my complete setup with MDB JBoss node and JMS cluster nodes (there are two hornetq nodes in cluster) and my remote client publishing JMS messages to the topic, complete flow passes. I can see the messages coming to my MDB. After this I stop one hornetq node (nodeA) in my cluster and I still see MDB listening to messages and getting called. When I restart hornetq nodeA again and stop hornetq nodeB now, MDB stops listening to the messages. My remote client is still able to publish messages properly which means hornetq node A is working fine.
Can you please provide some pointers for this?
******
Did some more analysis of the logs from the node where MDB is deployed - it seems MDB JBoss node connects to first hornetQ cluster node as soon as it up. See the following log snippet from MDB Jboss node where 10.10.16.129 is my node A of hornetQ cluster on port 5545:
14:36:51,046 DEBUG [org.hornetq.ra.inflow.HornetQActivation] (default-threads - 1) Using queue connection DelegatingSession [session=ClientSessionImpl [name=0136903f-dc21-11e1-a972
-9bc6f00bc34f, username=null, closed=false, factory = ClientSessionFactoryImpl [serverLocator=ServerLocatorImpl [initialConnectors=[org-hornetq-core-remoting-impl-netty-NettyConnec
torFactory?port=5545&host=10-10-16-129], discoveryGroupConfiguration=DiscoveryGroupConfiguration [discoveryInitialWaitTimeout=10000, groupAddress=231.7.7.7, groupPort=9876, localBi
ndAddress=null, name=fbdc52e8-dc20-11e1-a972-9bc6f00bc34f, refreshTimeout=10000]], connectorConfig=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5545&host=10-10-1
6-129, backupConfig=null], metaData=(jms-client-id=MDBServer,resource-adapter=inbound,jms-session=,)]@28024b7b]
When I start second node in the HornetQ cluster, that is also registered as node in MDB JBoss node. See the following log snippet from MDB Jboss node where 10.10.16.129 is my node B of hornetQ cluster on port 5645:
14:37:59,755 DEBUG [org.hornetq.core.client.impl.ServerLocatorImpl] (Thread-27 (HornetQ-client-global-threads-1688979363)) NodeUp ServerLocatorImpl [initialConnectors=[org-hornetq-
core-remoting-impl-netty-NettyConnectorFactory?port=5545&host=10-10-16-129], discoveryGroupConfiguration=DiscoveryGroupConfiguration [discoveryInitialWaitTimeout=10000, groupAddres
s=231.7.7.7, groupPort=9876, localBindAddress=null, name=fbdc52e8-dc20-11e1-a972-9bc6f00bc34f, refreshTimeout=10000]]::nodeID=736cf9f6-dc0e-11e1-9ed1-63aff85de1d1, connectorPair=Pa
ir[a=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory?port=5645&host=10-10-16-129, b=null]:
Now when I stop my node A of HornetQ cluster, it seems MDB JBoss node makes all reconnect attempts to Node A of hornetQ cluster only and never tries to connect to node B of hornet Q cluster:
14:39:07,867 DEBUG [org.hornetq.core.remoting.impl.netty.NettyConnector] (Thread-35 (HornetQ-client-global-threads-1688979363)) Started Netty Connector version 3.2.5.Final-a96d88c
14:39:07,848 DEBUG [org.hornetq.core.client.impl.ClientSessionFactoryImpl] (Thread-51 (HornetQ-client-global-threads-1688979363)) Trying to connect with connector = org.hornetq.cor
e.remoting.impl.netty.NettyConnectorFactory@79ab5825, parameters = {port=5545, host=10.10.16.129} connector = NettyConnector [host=10.10.16.129, port=5545, httpEnabled=false, useSe
rvlet=false, servletPath=/messaging/HornetQServlet, sslEnabled=false, useNio=false]
Thanks,
Himanshu
-
3. Re: MDB configuration to connect to clustered JMS topic
hgupta Aug 7, 2012 3:53 PM (in response to hgupta)I am still struggling here.
With multiple combinations tried - it seems the best I am able to achieve is that JBoss AS 7 MDB server only connects to one server in the cluster and wait till that server for that server to come up if its been stopped. It seems it never connects to the second node in JBoss AS 7 HornetQ cluster.
-
4. Re: MDB configuration to connect to clustered JMS topic
ndipiazza Aug 14, 2012 12:25 PM (in response to hgupta)I spoke with Justin Bertram over IRC.
Me: i am hoping to find a simple comma separated list of connectionParams e.g. host=abc.xyz.com;port=5445,host=def.xyz.com;port=5445
Justin: that should be possible
when you use the comma separated list did you have a comma separated list of transport class names also?
Me: I will check this.
Himanshu, are you supplying the comma separated list of transport class names as well?
- Nicholas DiPiazza
Open Logic OSS Support Engineer
-
5. Re: MDB configuration to connect to clustered JMS topic
hgupta Aug 15, 2012 2:36 PM (in response to ndipiazza)Hi Nicholas,
Yes, using comma separalted list.
Linking the post where second discussion happening: https://community.jboss.org/message/753824?_sscc=t#753824
Thanks,
Himanshu