You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to connect to an ActiveMQ broker which is running on the port 5673 instead of the standard 5671(because on 5671 we are running AMQP 0.91 with another broker).
I used the example:
import os
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
import uamqp
from uamqp import authentication
uri = "amqp://111.222.333.444:5673/examples/"
key_name = "user"
access_key = ******
def uamqp_send_simple():
msg_content = b"Hello world"
parsed_uri = urlparse(uri)
plain_auth = authentication.SASLPlain(parsed_uri.hostname, key_name, access_key)
uamqp.send_message(uri, msg_content, auth=plain_auth)
print("Message sent!")
if __name__ == "__main__":
uamqp_send_simple()
Anyway, it appears to be not working:
Traceback (most recent call last):
File "test.py", line 30, in <module>
uamqp_send_simple()
File "test.py", line 26, in uamqp_send_simple
uamqp.send_message(uri, msg_content, auth=plain_auth)
File "/usr/local/lib/python2.7/dist-packages/uamqp/__init__.py", line 68, in send_message
return send_client.send_all_messages()
File "/usr/local/lib/python2.7/dist-packages/uamqp/client.py", line 775, in send_all_messages
running = self.wait()
File "/usr/local/lib/python2.7/dist-packages/uamqp/client.py", line 757, in wait
running = self.do_work()
File "/usr/local/lib/python2.7/dist-packages/uamqp/client.py", line 401, in do_work
if not self.client_ready():
File "/usr/local/lib/python2.7/dist-packages/uamqp/client.py", line 385, in client_ready
if not self._client_ready():
File "/usr/local/lib/python2.7/dist-packages/uamqp/client.py", line 531, in _client_ready
self.message_handler.open()
File "/usr/local/lib/python2.7/dist-packages/uamqp/sender.py", line 208, in open
"Failed to open Message Sender. "
uamqp.errors.AMQPConnectionError: Failed to open Message Sender. Please confirm credentials and target URI.
Using wireshark I see that the TCP traffic is still going to 5671, so i suppose the port parameter is ignored at all.
Could you kindly post a working example on how to use uamqp on different TCP port.
The provided examples also they use environment variables, could be helpful to have a sample value of these environmental variables, i suppose is a standard form "amqps://host:port/channel".
Thanks
The text was updated successfully, but these errors were encountered:
I'm trying to connect to an ActiveMQ broker which is running on the port 5673 instead of the standard 5671(because on 5671 we are running AMQP 0.91 with another broker).
I used the example:
Anyway, it appears to be not working:
Using wireshark I see that the TCP traffic is still going to 5671, so i suppose the port parameter is ignored at all.
Could you kindly post a working example on how to use uamqp on different TCP port.
The provided examples also they use environment variables, could be helpful to have a sample value of these environmental variables, i suppose is a standard form "amqps://host:port/channel".
Thanks
The text was updated successfully, but these errors were encountered: