Created
November 20, 2013 18:43
-
-
Save robmadden/7568640 to your computer and use it in GitHub Desktop.
ActiveMQ Client
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
SERVER1 = 'X.X.X.X' SERVER2 = 'X.X.X.X' PORT = XXXXX client = PublishClient(SERVER1, ACTIVEMQ_PORT) | |
ip_dest = '' activemq_ip = SERVER1 | |
try: response = client.connect(USER, PASSWORD) activemq_ip = SERVER1 except Exception as e: client = PublishClient(SERVER2, PORT) | |
try: response = client.connect(USER, PASSWORD) activemq_ip = SERVER2 except Exception as e: if (mq_params['count'] == 0): | |
print "Could not connect to activemq." time.sleep(3) mq_params['count'] += 1 self.send(mq_params) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment