Skip to content

Instantly share code, notes, and snippets.

Avatar

Vijay Akkineni akkinenivijay

  • Cardlytics Inc
  • Atlanta
View GitHub Profile
View gist:4267d6657e0c1c55386c79a74dee35df
### Keybase proof
I hereby claim:
* I am akkinenivijay on github.
* I am vijayakkineni (https://keybase.io/vijayakkineni) on keybase.
* I have a public key ASBAzfm_Y6lBSLdb1-fNapES86pApCAOCEQCilZZwJ4uQgo
To claim this, I am signing this object:
@akkinenivijay
akkinenivijay / Consumer
Created Nov 25, 2013
A basic consumer example to consume a message from RabbitMQ Queue.
View Consumer
public class Consumer {
private final static String QUEUE_NAME = "Greet";
public static void main(String[] argv)
throws java.io.IOException,
java.lang.InterruptedException {
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setUsername("guest");
@akkinenivijay
akkinenivijay / Producer
Created Nov 25, 2013
An example to publish a message to RabbitMQ
View Producer
public class Producer {
private final static String QUEUE_NAME = "Greet";
public static void main(String[] argumentVariables)
throws java.io.IOException {
//opens a new connection with the broker
ConnectionFactory factory = new ConnectionFactory();
factory.setHost("localhost");
factory.setUsername("guest");
factory.setPassword("guest");