[rabbitmq-discuss] BrokerUnreachableException on .NET client

Aaron Feng aaron.feng at gmail.com
Wed Jun 10 18:05:14 BST 2009


I noticed if I spin up around 500 threads and give it the following function:

public static void DoWork() {
  try {
    var factory = new ConnectionFactory();
    var param = factory.Parameters;
    param.RequestedHeartbeat = 100;
    using (var conn = factory.CreateConnection(server)) {
      using (var ch = conn.CreateModel()) {
        for (int i = 0; i < times; i++) ch.BasicPublish(exchange,
routingKey, null, data);
      }
    }
  }
  catch(Exception ex) {
    Console.WriteLine(ex.Message);
  }
}

Some of the threads would bomb with
RabbitMQ.Client.Exceptions.BrokerUnreachableException: "None of the
specified endpoints were reachable".  I can reproduce this behaviour
consistently with lots of threads.  Is my test valid?  Am I doing
something obviously wrong?  Mostly I'm just trying to see what type of
errors could crop up when the broker is under load.

I'm using the current released .NET client on Windows and broker from
hg 1054:fce2dad390ee running on Ubuntu.

Thanks,

Aaron




More information about the rabbitmq-discuss mailing list