You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Mark Blum <Ma...@Charter.com> on 2017/03/23 21:24:22 UTC

Python qpid messaging api and amqp1.0 support

Hello all,

I'm trying to get amqp1.0 support working in Python so I can interact with
an ActiveMQ broker which supports amqp1.0.

What I can't figure out is what magic combination of steps will get this
working.

Note I am trying to use the messaging API at this time, not the proton
(reactor) API.

So far I've determined that the qpid Python bindings don't support amqp1.0,
but I get the impression that the python-cqpid bindings do.
However, I can't get it to work right (hence this message).  If I leave the
protocol option out when creating a new Connection object it defaults to
amqp0-10 (and I get an unsupported version error when opening the connection
to the ActiveMQ broker), and if I use the protocol option (e.g.
cqpid.Connection(broker_url, protocol = 'amqp1.0'), I get "RuntimeError:
Invalid option: protocol not recognised
(qpid/client/amqp0_10/ConnectionImpl.cpp:160)" which is obvious that it is
following an amqp0_10 code path.

I'm trying all this on an Ubuntu 16.04 LTS server, and I've installed qpid
via sudo apt-get install libqpid-proton2 python-cqpid python-qpid.

I'm willing to install any other packages and/or manually build packages if
it will help.

If someone can point out what I'm missing to get this to work I would
greatly appreciate it!



--
View this message in context: http://qpid.2158936.n2.nabble.com/Python-qpid-messaging-api-and-amqp1-0-support-tp7661439.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Python qpid messaging api and amqp1.0 support

Posted by Mark Blum <Ma...@Charter.com>.
Jakub Scholz-2 wrote
>  I had following packages installed from ppa:qpid/testing (+ some
> SASL libraries for authentication etc.):
> - libqpid-proton6
> - libqpidclient2
> - libqpidcommon2
> - libqpidmessaging2
> - libqpidtypes1
> - python-qpid-messaging

Jakub, I had most of what you listed (my proton version was different
though), but I could not find a python-qpid-messaging package (there were
several similarly named packages available though).  I did try simply
installing all qpid and proton packages available (as it is simple enough to
uninstall/purge things), but it did not fix the issue I was having.

I missed that you said you installed the packages from ppa:qpid/testing
though!   I'll have to check that out and see if I can leverage that instead
of having to manually build the packages myself next time.

Thanks for the information.



--
View this message in context: http://qpid.2158936.n2.nabble.com/Python-qpid-messaging-api-and-amqp1-0-support-tp7661439p7661443.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Python qpid messaging api and amqp1.0 support

Posted by Jakub Scholz <ja...@scholz.cz>.
Hi Mark,

Last time I used the Python binding against the C++ API on Ubuntu (I
actually use it against Qpid C++ broker and not against ActiveMQ, but with
AMQP 1.0) I had following packages installed from ppa:qpid/testing (+ some
SASL libraries for authentication etc.):
- libqpid-proton6
- libqpidclient2
- libqpidcommon2
- libqpidmessaging2
- libqpidtypes1
- python-qpid-messaging

That was probably few months ago, but maybe it still helps a bit.

Thanks & Regards
Jakub

On Thu, Mar 23, 2017 at 10:24 PM, Mark Blum <Ma...@charter.com> wrote:

> Hello all,
>
> I'm trying to get amqp1.0 support working in Python so I can interact with
> an ActiveMQ broker which supports amqp1.0.
>
> What I can't figure out is what magic combination of steps will get this
> working.
>
> Note I am trying to use the messaging API at this time, not the proton
> (reactor) API.
>
> So far I've determined that the qpid Python bindings don't support amqp1.0,
> but I get the impression that the python-cqpid bindings do.
> However, I can't get it to work right (hence this message).  If I leave the
> protocol option out when creating a new Connection object it defaults to
> amqp0-10 (and I get an unsupported version error when opening the
> connection
> to the ActiveMQ broker), and if I use the protocol option (e.g.
> cqpid.Connection(broker_url, protocol = 'amqp1.0'), I get "RuntimeError:
> Invalid option: protocol not recognised
> (qpid/client/amqp0_10/ConnectionImpl.cpp:160)" which is obvious that it is
> following an amqp0_10 code path.
>
> I'm trying all this on an Ubuntu 16.04 LTS server, and I've installed qpid
> via sudo apt-get install libqpid-proton2 python-cqpid python-qpid.
>
> I'm willing to install any other packages and/or manually build packages if
> it will help.
>
> If someone can point out what I'm missing to get this to work I would
> greatly appreciate it!
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.
> com/Python-qpid-messaging-api-and-amqp1-0-support-tp7661439.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Python qpid messaging api and amqp1.0 support

Posted by Mark Blum <Ma...@Charter.com>.
Gordon Sim wrote
> Is there a particular reason for that choice? (The swigged 
> qpid_messaging is not really a first-class client. It was more of an 
> internal convenience for writing tests etc).

Thanks for the reply Gordon.  As for the reason for the combo, we are a
Python shop, we are using ActiveMQ for our broker, and we've decided to use
amqp1.0 to communicate with ActiveMQ.

To that end it looks like using Apache Qpid is the way to go.  Furthermore,
I would like to use the Qpid messaging API as I find synchronous apps easier
to test and its examples mesh with my understanding of how AMQP works
(connections, sessions, etc.), and as stated earlier the Python bindings for
the messaging API currently don't support amqp1.0 hence going the C++ Python
binding route.  I may switch to the Proton (reactor) API in the future
though.


Gordon Sim wrote
> It sounds like your c++ client library was built without 1.0 support 
> enabled.

You are probably right about the Ubuntu packages I installed as I have no
idea what options they were built with.  


Gordon Sim wrote
> If you build qpid-cpp with proton installed, you should get 1.0 support. 

I did go ahead and build the packages manually (both qpid-proton so that
amqp1.0 support would be available as you mentioned and qpid-cpp), and
things are now working for me.

Thanks again!



--
View this message in context: http://qpid.2158936.n2.nabble.com/Python-qpid-messaging-api-and-amqp1-0-support-tp7661439p7661442.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Python qpid messaging api and amqp1.0 support

Posted by Gordon Sim <gs...@redhat.com>.
On 23/03/17 21:24, Mark Blum wrote:
> Hello all,
>
> I'm trying to get amqp1.0 support working in Python so I can interact with
> an ActiveMQ broker which supports amqp1.0.
>
> What I can't figure out is what magic combination of steps will get this
> working.
>
> Note I am trying to use the messaging API at this time, not the proton
> (reactor) API.

Is there a particular reason for that choice? (The swigged 
qpid_messaging is not really a first-class client. It was more of an 
internal convenience for writing tests etc).

> So far I've determined that the qpid Python bindings don't support amqp1.0,
> but I get the impression that the python-cqpid bindings do.
> However, I can't get it to work right (hence this message).  If I leave the
> protocol option out when creating a new Connection object it defaults to
> amqp0-10 (and I get an unsupported version error when opening the connection
> to the ActiveMQ broker), and if I use the protocol option (e.g.
> cqpid.Connection(broker_url, protocol = 'amqp1.0'), I get "RuntimeError:
> Invalid option: protocol not recognised
> (qpid/client/amqp0_10/ConnectionImpl.cpp:160)" which is obvious that it is
> following an amqp0_10 code path.

It sounds like your c++ client library was built without 1.0 support 
enabled.

> I'm trying all this on an Ubuntu 16.04 LTS server, and I've installed qpid
> via sudo apt-get install libqpid-proton2 python-cqpid python-qpid.
>
> I'm willing to install any other packages and/or manually build packages if
> it will help.
>
> If someone can point out what I'm missing to get this to work I would
> greatly appreciate it!

If you build qpid-cpp with proton installed, you should get 1.0 support. 
(You can verify this with the c++ examples or test utils). The swig 
wrapper for qpid_messaging is built as part of that.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org