queue - use qpid-proton to send persistent messages to Azure service bus - url parsing error -


i'm trying use python-qpid-proton version 0.9.1 send message azure service bus queue.

the examples in examples/python/messenger/ accept addresses of form amqps://:@/, , can send messages queue have on azure it. problem can't control of what's going on, namely can't see if sending failed. want persist messages in case internet connection goes down temporarily.

the example code examples/python/db_send.py , examples/python/simple_send.py seem more useful aspects, use messaginghandler instead of messenger class. when run them, error:

 ./simple_send.py -a amqps://send:mxirestofmypassword@testsoton.servicebus.windows.net/queue2 traceback (most recent call last):  file "./simple_send.py", line 62, in <module>     container(send(opts.address, opts.messages)).run()   file "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 120, in run     while self.process(): pass   file "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 143, in proce     self._check_errors()   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3737, in dis     ev.dispatch(self.handler)   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3662, in dis     result = dispatch(handler, type.method, self)   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3551, in dis     return m(*args)   file "/usr/local/lib/python2.7/dist-packages/proton/handlers.py", line 416, in on_r     self.on_start(event)   file "./simple_send.py", line 36, in on_start     event.container.create_sender(self.url)   file "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 671, in creat     session = self._get_session(context)   file "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 634, in _get_     return self._get_session(self.connect(url=context))   file "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 611, in conne     if url: connector.address = urls([url])   file "/usr/local/lib/python2.7/dist-packages/proton/reactor.py", line 555, in __ini     self.values = [url(v) v in values]   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3851, in __i     if defaults: self.defaults()   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3894, in def     self.port = self.port or self.port(self.scheme)   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3868, in _ge     return portstr , url.port(portstr)   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3812, in __n     port = super(url.port, cls).__new__(cls, cls._port_int(value))   file "/usr/local/lib/python2.7/dist-packages/proton/__init__.py", line 3833, in _po     raise valueerror("not valid port number or service name: '%s'" % value) valueerror: not valid port number or service name: 'mxitheresto' 

seems me not parse address correctly. pasted same address before. , pasted python interpreter, this:

 import proto  u =     proton.url("amqps://send:mxirestofmypassword@testsoton.servicebus.windows.net/queue2")  # no error, , can access parameters:  u.port  5671  u.username  send  # ... 

it works fine if use local connection no username , password. gets past point if don't use username , password not work fails authentication.

is there way can use messaginghandler class , specify username , password send messages remote (like on azure)?

the examples examples/python/db_send.py , examples/python/simple_send.py request azure service bus ok, can't establish sender connection amqps scheme.

refer msdn offical document https://msdn.microsoft.com/en-us/library/azure/jj841070.aspx, ms recommends use messenger class send messages.

the details issue, please refer post @ python-qpid-proton examples, send message azure not working.


Comments

Popular posts from this blog

java - UnknownEntityTypeException: Unable to locate persister (Hibernate 5.0) -

python - ValueError: empty vocabulary; perhaps the documents only contain stop words -

ubuntu - collect2: fatal error: ld terminated with signal 9 [Killed] -