stomp.py

ActiveMQ - STOMP+SSL with Python STOMP client

青春壹個敷衍的年華 提交于 2019-12-06 07:45:31
问题 Can anyone explain me how to add SSL to the Python STOMP client I'm using. I added the stomp+ssl transport connector in the ActiveMQ configuration file and my basic Python STOMP client is below: import time import sys import stomp class MyListener(stomp.ConnectionListener): def on_error(self, headers, message): print('received an error "%s"' % message) def on_message(self, headers, message): print('received a message "%s"' % message) conn = stomp.Connection() conn.set_listener('', MyListener(

ActiveMQ - STOMP+SSL with Python STOMP client

冷暖自知 提交于 2019-12-04 12:11:01
Can anyone explain me how to add SSL to the Python STOMP client I'm using. I added the stomp+ssl transport connector in the ActiveMQ configuration file and my basic Python STOMP client is below: import time import sys import stomp class MyListener(stomp.ConnectionListener): def on_error(self, headers, message): print('received an error "%s"' % message) def on_message(self, headers, message): print('received a message "%s"' % message) conn = stomp.Connection() conn.set_listener('', MyListener()) conn.start() conn.connect('admin', 'password', wait=True) conn.subscribe(destination='/queue/test',