Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8172975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:58:09+00:00 2026-06-06T21:58:09+00:00

I have been running the hello world RabbitMQ example with the code below: import

  • 0

I have been running the hello world RabbitMQ example with the code below:

import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;

public class Send {
    private final static String QUEUE_NAME = "hello";

    public static void main(String[] argv) throws java.io.IOException {
        ConnectionFactory factory = new ConnectionFactory();
        factory.setHost("localhost");
        Connection connection = factory.newConnection();
        Channel channel = connection.createChannel();

        channel.queueDeclare(QUEUE_NAME, false, false, false, null);
        String message = "Hello World!";
        channel.basicPublish("", QUEUE_NAME, null, message.getBytes());

        System.out.println(" [x] Sent '" + message + "'");
        channel.close();
        connection.close(); 
      }
    }

and:

import com.rabbitmq.client.ConnectionFactory;
import com.rabbitmq.client.Connection;
import com.rabbitmq.client.Channel;
import com.rabbitmq.client.QueueingConsumer;

public class Recv {
      private final static String QUEUE_NAME = "hello";

      public static void main(String[] argv)
          throws java.io.IOException,
                 java.lang.InterruptedException {

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

          channel.queueDeclare(QUEUE_NAME, false, false, false, null);
          System.out.println(" [*] Waiting for messages. To exit press CTRL+C");

          QueueingConsumer consumer = new QueueingConsumer(channel);
          channel.basicConsume(QUEUE_NAME, true, consumer);

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

When I run the receiver it listens to the queue, and the sender says its sending the message but doesn’t seem to close. I then run:

rabbitmqctl list_queues

The queue is definitely being created.

However when I run:

rabbitmqctl list_connections

I get the following output

benuni@DeShawn:~$ sudo rabbitmqctl list_connections
ls: cannot access /etc/rabbitmq/rabbitmq.conf.d: No such file or directory
Listing connections ...
guest   127.0.0.1   64700   blocked
guest   127.0.0.1   64709   blocked
guest   127.0.0.1   64614   blocked
guest   127.0.0.1   64716   blocked
guest   127.0.0.1   64717   blocked
guest   127.0.0.1   64701   blocked
guest   127.0.0.1   64699   blocking
guest   127.0.0.1   64613   blocking
guest   127.0.0.1   64708   blocking
guest   127.0.0.1   64718   blocked
guest   127.0.0.1   64706   blocked
...done.

SO for some reason the rabbitmq server is blocking my connections?
Does anyone know what i need to do?
Thanks,
Ben

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T21:58:11+00:00Added an answer on June 6, 2026 at 9:58 pm

    Check log for messages like:

    =INFO REPORT==== 2-Jul-2012::13:38:02 ===
    Disk free space limit now exceeded. Free bytes:13114646528 Limit:15740784640
    

    See http://comments.gmane.org/gmane.comp.networking.rabbitmq.general/16493 for more info

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I been trying to get the Spring Batch Hello World 3 example running from
I have an Hello world applet,taken from book example. HelloWorldApplet.java import java.awt.*; import javax.swing.*;
I have been using this code, but have been running into some memory issues:
I've been trying to get a simple hello world web app running on Sinatra.
I have been running around here and there on NoSQL big data storage technologies.
I have been running drush scripts (for Drupal ) with Cygwin on my relatively
I have been trying to learn Erlang and have been running into some problems
So I have been running the numbers for Azure and RackSpace Cloud Servers and
So I have been running into all kinds of interesting problems in VisualStudio 2008
I have been porting oracle selects, and I have been running across a lot

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.