HornetQ ssl connection receiver MDB
ravi21588 Aug 1, 2017 4:52 AMHi all,
we are trying to connect to remote HornetQ server to get the messages from queue using SSL connection from another application in Jboss EAP 6.4.
HornerQ server 2.3.5 is running in Jboss EAP 6.1
Hornetq Server configuration is as below.
Connector config:
<connector name="netty-ssl" socket-binding="ssl-messaging">
<param key="ssl-enabled" value="true"/>
<param key="trust-store-path" value="<JBOSS_HOME>/opt/security/truststore.jks"/>
<param key="trust-store-password" value="changeit"/>
</connector>
Acceptor config:
<acceptor name="netty-ssl" socket-binding="ssl-messaging">
<param key="ssl-enabled" value="true"/>
<param key="key-store-path" value="<JBOSS_HOME>//opt/security/keystore.jks"/>
<param key="key-store-password" value="p@ssw0rd"/>
</acceptor>
Port config:
<socket-binding name="ssl-messaging" port="25014"/>
Connection factor settings.
<connection-factory name="SSLRemoteConnectionFactory">
<connectors>
<connector-ref connector-name="netty-ssl"/>
</connectors>
<entries>
<entry name="java:jboss/exported/jms/SSLRemoteConnectionFactory"/>
</entries>
</connection-factory>
In client side we have done the below configuration:
for sending the messages we are doing a remote jndi lookp for the SSLRemoteConnectionFactory and the connection is working perfectly fine.
for receiving message we have usedMDB
to listen remote server queue.
MDB configuration is as below ejb-jar.xml.
<message-driven xmlns="" id="MessageDriven_ClientAppACKListener">
<description>Message Driven Bean for JMS Listener ClientAppACKListener</description>
<ejb-name>ClientAppACKListener</ejb-name>
<ejb-class>com.pega.pegarules.internal.etier.mdb.PRJMSListenerBoot</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Bean</transaction-type>
<message-destination-type>javax.jms.Queue</message-destination-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value>javax.jms.Queue</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destination</activation-config-property-name>
<activation-config-property-value>POLICY.ACK</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>connectorClassName</activation-config-property-name>
<activation-config-property-value>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>connectionParameters</activation-config-property-name>
<activation-config-property-value>host=sl055542.domain.org;port=25014</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>user</activation-config-property-name>
<activation-config-property-value>guest</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>password</activation-config-property-name>
<activation-config-property-value>guest@123</activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>maxSession</activation-config-property-name>
<activation-config-property-value>2</activation-config-property-value>
</activation-config-property>
</activation-config>
<env-entry>
<env-entry-name>PRListener</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>ClientAppACKListener</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>UseCMT</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>false</env-entry-value>
</env-entry>
<ejb-local-ref id="EJBLocalRef_ClientAppACKListener_EngineBMTLocal">
<description/>
<ejb-ref-name>ejb/EngineBMTLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.pega.pegarules.internal.etier.interfaces.EngineLocalHome</local-home>
<local>com.pega.pegarules.internal.etier.interfaces.EngineLocal</local>
<ejb-link>EngineBMT</ejb-link>
</ejb-local-ref>
<ejb-local-ref id="EJBLocalRef_ClientAppACKListener_EngineCMTLocal">
<description/>
<ejb-ref-name>ejb/EngineCMTLocal</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<local-home>com.pega.pegarules.internal.etier.interfaces.EngineLocalHome</local-home>
<local>com.pega.pegarules.internal.etier.interfaces.EngineLocal</local>
<ejb-link>EngineCMT</ejb-link>
</ejb-local-ref>
</message-driven>
We are unable to connect to HornetQ and we are getting the exception HornetQException[errorType=CONNECTION_TIMEDOUT message=HQ119013: Timed out waiting to receive cluster topology. Group:null]
Can you please let us know what is wrong with our configuration.Non SSL connections are working perfectly fine.
Message was edited by: ravi narayanan