-
1. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
jbertram Jun 15, 2016 10:25 AM (in response to sandeep.joseph)My first thought is that maybe you're client/server libraries are not the same version. Can you confirm that the client jar versions match the server?
Beyond that, I'd need to know more about your environment and client/server configuration. Can you elaborate on these points?
-
2. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
sandeep.joseph Jun 16, 2016 5:37 AM (in response to jbertram)Dear Justin,
Thank you so much for your response. My environment is pretty simple. I run a freshly downloaded hornetq-2.2.5.Final server on an Ubuntu machine with java 1.7.0_95. And my Subscriber is very simple Spring Boot application sending a message to a destination on this server and trying to subscribe from it. This application runs on the same Ubuntu machine, basically HornetQ and the java application on the same localhost. I am attaching the Spring boot application, you can simply unzip it and build/run it as a normal Maven application.
I find the same problem in my QA landscape where the HornetQ server configuration is much more complex. So I guess I'm missing something very basic.
Regards,
Sandeep
-
hornetqtest.zip 52.5 KB
-
-
3. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
sandeep.joseph Jun 16, 2016 11:01 AM (in response to sandeep.joseph)Hi Justin,
I managed to connect using the native hornetq libraries instead of Spring. Perhaps the Spring implementation has some incompatibilities. But I guess we don't have to waste time trying to find that out for the moment. Below is the working code:
I sincerely appreciate your time and effort intending to help me.
Cheers,
Sandeep
------------------------------------------------------------------------------------------------------------------
package hornetqmessaging;
import java.util.HashMap;
import java.util.Map;
import org.hornetq.api.core.TransportConfiguration;
import org.hornetq.api.core.client.ClientConsumer;
import org.hornetq.api.core.client.ClientMessage;
import org.hornetq.api.core.client.ClientSession;
import org.hornetq.api.core.client.ClientSessionFactory;
import org.hornetq.api.core.client.HornetQClient;
import org.hornetq.api.core.client.ServerLocator;
public class MessageConsumer {
public static void main(String[] args) throws Exception {
String queueName = "q_sandeep";
//Get a session and consumer to the queue
ClientSession session = getClientSession();
ClientConsumer cc = session.createConsumer(queueName);
session.start();
String message;
do {
//Blocking receive
System.out.println("Waiting (Blocked) for message from " + queueName);
ClientMessage received = cc.receive();
received.acknowledge();
message = received.getBodyBuffer().readString();
System.out.println("Received a message from " + queueName + ": " + message);
}
while(!"stop".equalsIgnoreCase(message));
session.close();
}
private static ClientSession getClientSession() throws Exception {
System.out.println("Initiating connection...");
Map<String, Object> connectionParams = new HashMap<String, Object>();
connectionParams.put(org.hornetq.core.remoting.impl.netty.TransportConstants.PORT_PROP_NAME, 5445);
connectionParams.put(org.hornetq.core.remoting.impl.netty.TransportConstants.HOST_PROP_NAME, "10.97.154.143");
TransportConfiguration transportConfiguration = new TransportConfiguration(org.hornetq.core.remoting.impl.netty.NettyConnectorFactory.class.getCanonicalName(), connectionParams);
ServerLocator loc = HornetQClient.createServerLocatorWithoutHA(transportConfiguration);
ClientSessionFactory sessionFactory = loc.createSessionFactory(transportConfiguration);
System.out.println("Session Factory Created: " + sessionFactory.toString());
return sessionFactory.createSession(true, true);
}
}
-
4. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
jbertram Jun 16, 2016 11:52 AM (in response to sandeep.joseph)I ran the test in the project you attached and it looks to me like the HornetQ broker simply isn't configured properly to support connections on port 5445. However, I'm not familiar enough with the Spring Boot integration with HornetQ to tell you what you need to do to fix it.
-
5. Re: Connection Error - message=HQ119013: Timed out waiting to receive cluster topology. Group:null
pmerson Oct 19, 2017 8:45 AM (in response to sandeep.joseph)I had the same problem.
Specifically, I was trying to get a Spring Boot (version 1.4.1) application to send a message to HornetQ Server version 2.3.25.SP13 (embedded on a JBoss 6.4.10 server).
The solution was to add the following dependency to my Spring Boot application:
<dependency>
<groupId>org.hornetq</groupId>
<artifactId>hornetq-jms-client</artifactId>
<version>2.3.22.Final</version>
</dependency>