Connection failure detected
unficyp Jul 20, 2012 3:00 AMHi,
i use hornetq 2.2.14 final with core only + embedded without any configuration files.
Everything is setup and configured in my java code.
{code}
try {
HashMap<String, Object> map = new HashMap<String, Object>();
map.put("host", "192.168.20.150");
map.put("port", 8989);
Configuration configuration = new ConfigurationImpl();
configuration.setPersistenceEnabled(false);
configuration.setSecurityEnabled(false);
HashSet<TransportConfiguration> transports = new HashSet<TransportConfiguration>();
transports.add(new TransportConfiguration(NettyAcceptorFactory.class.getName(),map));
//transports.add(new TransportConfiguration(InVMAcceptorFactory.class.getName()));
configuration.setAcceptorConfigurations(transports);
EmbeddedHornetQ embedded = new EmbeddedHornetQ();
embedded.setConfiguration(configuration);
embedded.start();
//ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(InVMConnectorFactory.class.getName()));
ServerLocator serverLocator = HornetQClient.createServerLocatorWithoutHA(new TransportConfiguration(NettyConnectorFactory.class.getName(),map));
serverLocator.setConnectionTTL(-1);
serverLocator.setClientFailureCheckPeriod(-1);
ClientSessionFactory sf = serverLocator.createSessionFactory();
ClientSession coreSession = sf.createSession(false, false, false);
coreSession.createQueue(queueName, queueName, true);
coreSession.close();
session = sf.createSession();
producer = session.createProducer(queueName);
} catch (Exception e) {
e.printStackTrace();
}
{code}
After this, i setup my ZeroMQ Subscriber connection and wait for a message in a loop:
{code}
while(true) {
byte[] m = sub.recv(0); // blocks here
... handle message here then send it over hornetq
producer.send(message);
{code}
Even if no client is connected and with the timeouts disabled i get the error
Jul 19, 2012 3:51:14 PM org.hornetq.core.logging.impl.JULLogDelegate warn
Warnung: Connection failure has been detected: Did not receive data from /192.168.20.150:24791. It is likely the client has exited or crashed without closing it
s connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly
. Please check user manual for more information. The connection will now be closed. [code=3]
I dont get this one...why does this happen ?
regards,
gw