java - How to configure Connection to RabbitMQ broker -


i have been trying connect rabbitmq when broker in shutdown state. far have:

    com.rabbitmq.client.connectionfactory factory = new      com.rabbitmq.client.connectionfactory();     factory.sethost("localhost");     factory.setport(5672);     factory.setautomaticrecoveryenabled(true);     factory.setnetworkrecoveryinterval(100000);      factory.setconnectiontimeout(100000);     factory.sethandshaketimeout(100000);      return factory.newconnection(); 

however when factory.newconnection() executed when application startup. here stacktrace:

caused by: java.io.ioexception @ com.rabbitmq.client.impl.amqchannel.wrap(amqchannel.java:124) @ com.rabbitmq.client.impl.amqchannel.wrap(amqchannel.java:120) @ com.rabbitmq.client.impl.amqconnection.start(amqconnection.java:362) @ com.rabbitmq.client.impl.recovery.recoveryawareamqconnectionfactory.newconnection(recoveryawareamqconnectionfactory.java:63) @ com.rabbitmq.client.impl.recovery.autorecoveringconnection.init(autorecoveringconnection.java:99) @ com.rabbitmq.client.connectionfactory.newconnection(connectionfactory.java:918) @ com.rabbitmq.client.connectionfactory.newconnection(connectionfactory.java:877) @ com.rabbitmq.client.connectionfactory.newconnection(connectionfactory.java:835) @ com.rabbitmq.client.connectionfactory.newconnection(connectionfactory.java:987) @ com.app.rabbitmqconectionfactory.provide(rabbitmqconectionfactory.java:41) ... 75 more caused by: com.rabbitmq.client.shutdownsignalexception: connection error @ com.rabbitmq.utility.valueorexception.getvalue(valueorexception.java:66) @ com.rabbitmq.utility.blockingvalueorexception.uninterruptiblegetvalue(blockingvalueorexception.java:36) @ com.rabbitmq.client.impl.amqchannel$blockingrpccontinuation.getreply(amqchannel.java:443) @ com.rabbitmq.client.impl.amqconnection.start(amqconnection.java:306) ... 82 more caused by: java.io.eofexception @ java.io.datainputstream.readunsignedbyte(datainputstream.java:290) @ com.rabbitmq.client.impl.frame.readfrom(frame.java:91) @ com.rabbitmq.client.impl.socketframehandler.readframe(socketframehandler.java:164) @ com.rabbitmq.client.impl.amqconnection$mainloop.run(amqconnection.java:580) @ java.lang.thread.run(thread.java:745) 


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -