[rabbitmq-discuss] Problem when running second consumer

Balachandar R.A. balachandar.ra at gmail.com
Thu May 16 10:25:25 BST 2013

I am able to do the following

telnet ip-of-server 15672

And I could connect to server from my consumer

I installed the server from debian repo. I did sudo apt-get install

I did not do any other config and started testing the code.

My code portion is below

ConnectionFactory factory = new ConnectionFactory();
    Connection connection = factory.newConnection();
    Channel channel = connection.createChannel();

    channel.queueDeclare("Q", false, false, false, null);
    System.out.println(" [*] Waiting for messages. To exit press CTRL+C");
QueueingConsumer consumer = new QueueingConsumer(channel);
    channel.basicConsume("task_queue", true, consumer);

    while (true) {
      QueueingConsumer.Delivery delivery = consumer.nextDelivery();
      String message = new String(delivery.getBody());
      System.out.println(" [x] Received '" + message + "'");

With thanks and regards

On 16 May 2013 14:41, "Tim Watson" <tim at rabbitmq.com> wrote:

> Oh and one more thing.... You said...
> I am not doing anything for authentication.
> What exactly are you doing to make a connection from host A to host B -
> what does your URL look like?
> Cheers,
> Tim
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130516/1487c1c0/attachment.htm>

More information about the rabbitmq-discuss mailing list