Created
January 2, 2012 16:53
-
-
Save adamrabung/1551353 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ConnectionFactory factory = new ConnectionFactory(); | |
Address[] adds = new Address[] { new Address("localhost", 5672), new Address("localhost", 5673), new Address("localhost", 5674) }; | |
Connection conn = factory.newConnection(adds); | |
conn.addShutdownListener(new ShutdownListener() { | |
@Override | |
public void shutdownCompleted(ShutdownSignalException cause) { | |
System.out.println("Connection shut down"); | |
} | |
}); | |
Channel ch = conn.createChannel(); | |
ch.addShutdownListener(new ShutdownListener() { | |
@Override | |
public void shutdownCompleted(ShutdownSignalException cause) { | |
System.out.println("Channel shut down"); | |
} | |
}); | |
Thread.sleep(2389234892l); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment