[rabbitmq-discuss] Suddenly dropping all conns?

ku3ia demesg at gmail.com
Thu Sep 12 11:14:17 BST 2013


Thanks for your posts.

>>Any activity on a connection counts for a heart beat. Can you post a
snippet of code 
>>that creates connection factory and a connection? 

Sure, 
C#:
var connectionFactory = new ConnectionFactory { Uri =
"amqp://guest:guest@10.112.1.250:5672/%2F" };
var conn = connectionFactory.CreateConnection();
var channel = conn.CreateModel();

... // << Breakpoint here, wait 30 mins - connection is dropped

Java:
public static void main(String[] args) {
    try {
        ConnectionFactory connectionFactory = new ConnectionFactory();
       
connectionFactory.setUri("amqp://guest:guest@10.112.1.250:5672/%2F");

        Connection connection = connectionFactory.newConnection();
        Channel channel = connection.createChannel();

        String k = "gfdgdgdf"; // << Breakpoint here, wait 30 mins -
connection is dropped
    } catch (Exception e){
        logger.warn(e);
    }
    System.exit(0);
}

If I set up a requestedHeartbeat, for example, 10, after 10 seconds
connection is dropped. This is Windows machine on both clients.
Also I'm using also rabbitmq-river for elasticsearch. Client is 3.1.1 there.
It runs from Ubuntu machine and connection idle for 2 days and don't
dropped.

Source there:
https://github.com/elasticsearch/elasticsearch-river-rabbitmq/blob/master/src/main/java/org/elasticsearch/river/rabbitmq/RabbitmqRiver.java

Thanks



--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/Suddenly-dropping-all-conns-tp16885p29557.html
Sent from the RabbitMQ mailing list archive at Nabble.com.


More information about the rabbitmq-discuss mailing list