Skip to content

Instantly share code, notes, and snippets.

@nitindhar7
Created May 31, 2012 02:36
Show Gist options
  • Save nitindhar7/2840586 to your computer and use it in GitHub Desktop.
Save nitindhar7/2840586 to your computer and use it in GitHub Desktop.
Setting up a connection to RabbitMQ and declaring a queue.
ConnectionFactory factory = new ConnectionFactory();
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare("registered-users", false, false, false, null);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment