You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Hamza Sheikh <fe...@codeghar.com> on 2016/01/22 00:47:26 UTC

Can Proton replace qpid-qmf, qpid-python, qpid-tools?

I'm currently using qpid-python, qpid-tools, and qpid-qmf for 
sending/receiving messages and to get info about/from the Qpid broker 
(queues, stats, etc.).

Unfortunately, qpid-python is Python 2 only and does not support Python 
3 (can't even pip install). I tried to port it to Python 3 but gave up 
because (a) code quality is a complete mess, (b) messaging is not my 
passion, (c) I did not have more time to spend on it.

My code depends on these three packages and I can't support Python 3 in 
my code because of this limitation.

Can Proton replace qpid-python, qpid-tools, qpid-qmf for *both* my use 
cases: (a) read/receive messages and (b) get info from the broker?

-- 
Hamza Sheikh
Twitter: @aikchar

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


Re: Can Proton replace qpid-qmf, qpid-python, qpid-tools?

Posted by Alan Conway <ac...@redhat.com>.
On Mon, 2016-01-25 at 11:27 -0800, Hamza Sheikh wrote:
> Thank you Robbie, Gordon, Fraser, and Matt.
> 
> I'm going to read through the sources and try my hand at a prototype.
> I 
> may not be able to make much reportable progress soon but I'll keep
> the 
> list posted on any progress.
> 

Not sure how relevant this (yet) is but qpid dispatch has a general
purpose AMQP management tool based on the emerging AMQP management
draft specification. It also has a python library designed to make
building such tools easier.

This won't help you with QMF directly but if/when you need to manage
resources that comply with the emerging AMQP management standard it
might be relevant.

QMF and the AMQP management draft are similar: both involve exchanging
AMQP messages with maps of name:value pairs. Unfortunately not
organized exactly the same way but building management clients for
either is very similar. Your main task will be mapping input to your
client (from command line parameters, json files or whatever) to and
from the correct message format.

Cheers,
Alan.

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


Re: Can Proton replace qpid-qmf, qpid-python, qpid-tools?

Posted by Hamza Sheikh <fe...@codeghar.com>.
Thank you Robbie, Gordon, Fraser, and Matt.

I'm going to read through the sources and try my hand at a prototype. I 
may not be able to make much reportable progress soon but I'll keep the 
list posted on any progress.

-- 
Hamza Sheikh
Twitter: @aikchar

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


Re: Can Proton replace qpid-qmf, qpid-python, qpid-tools?

Posted by Matt Broadstone <mb...@gmail.com>.
On Sat, Jan 23, 2016 at 4:49 AM, Fraser Adams <fraser.adams@blueyonder.co.uk
> wrote:

> Hi Hamza,
> Actually I did exactly that (QMF using proton) as a demo for the proton
> JavaScript binding so that should give you a few pointers. Take a look at:
>
> proton/examples/javascript/messenger/qpid-config.js
>
> Which is a pretty complete port of qpid-config written in pure JavaScript
> using proton.
>
> A few caveats.
>
> 1. the JavaScript binding uses a WebSocket transport so to talk to the C++
> broker I used a WebSocket to TCP socket proxy - that is probably no odds to
> you as you want to use python, so what I've done is mainly likely to be
> just a crib for what you want to do.
>
> 2. It uses the messenger API, the current feeling tends to be that the
> reactor API is the way to go, unfortunately that's not something I'm
> familiar with and I've been a bit distracted on other things so haven't had
> time to look at that for JavaScript yet. Porting what I've done to python's
> messenger API should work OK though it's just a question if whether you
> want to use an API that isn't getting so much attention.
>
> 3. JavaScript is fundamentally asynchronous so I've had to put code in
> place to correlate the QMF requests and responses, as it happens that
> complication was one of the main reason I wanted to put together a demo.
> With python messenger I *think* you could simplify things with synchronous
> requests and responses.
>
> 4. I'm not overly familiar with python, but I did liberally crib the
> python messenger binding for the JavaScript one, so I believe that you just
> might get a fair bit of mileage if you look at qpid-config.js as a starting
> point.
>
> HTH,
> Frase
>
>
Hey,
I was also going to point out that I have a (very) rudimentary qmf2 module
up on the npm registry here: https://www.npmjs.com/package/qmf2. It uses
plain AMQP 1.0, so theoretically you could do everything that module does
with just proton. You might be able to get an idea from that code what
properties would be useful for your case.

Matt



>
> On 22/01/16 18:07, Robbie Gemmell wrote:
>
>> On 21 January 2016 at 23:47, Hamza Sheikh <fe...@codeghar.com> wrote:
>>
>>> I'm currently using qpid-python, qpid-tools, and qpid-qmf for
>>> sending/receiving messages and to get info about/from the Qpid broker
>>> (queues, stats, etc.).
>>>
>>> Unfortunately, qpid-python is Python 2 only and does not support Python 3
>>> (can't even pip install). I tried to port it to Python 3 but gave up
>>> because
>>> (a) code quality is a complete mess, (b) messaging is not my passion,
>>> (c) I
>>> did not have more time to spend on it.
>>>
>>> My code depends on these three packages and I can't support Python 3 in
>>> my
>>> code because of this limitation.
>>>
>>> Can Proton replace qpid-python, qpid-tools, qpid-qmf for *both* my use
>>> cases: (a) read/receive messages and (b) get info from the broker?
>>>
>>> --
>>> Hamza Sheikh
>>> Twitter: @aikchar
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>>> For additional commands, e-mail: users-help@qpid.apache.org
>>>
>>> I don't have much experience at all with the python bits components
>> but I believe the situation is such that the answer is generally yes,
>> you could use proton to send/receive messages and get info from the
>> broker, as the QMF tools are essentially sending/receiving
>> particularly formatted messages to the broker that you could similarly
>> produce/interpret yourself. The older components would have been using
>> AMQP 0-10, whereas with Proton you would be using AMQP 1.0, and so
>> there could be differences in specific approach due to that.
>>
>> Robbie
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: users-help@qpid.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>

Re: Can Proton replace qpid-qmf, qpid-python, qpid-tools?

Posted by Fraser Adams <fr...@blueyonder.co.uk>.
Hi Hamza,
Actually I did exactly that (QMF using proton) as a demo for the proton 
JavaScript binding so that should give you a few pointers. Take a look at:

proton/examples/javascript/messenger/qpid-config.js

Which is a pretty complete port of qpid-config written in pure 
JavaScript using proton.

A few caveats.

1. the JavaScript binding uses a WebSocket transport so to talk to the 
C++ broker I used a WebSocket to TCP socket proxy - that is probably no 
odds to you as you want to use python, so what I've done is mainly 
likely to be just a crib for what you want to do.

2. It uses the messenger API, the current feeling tends to be that the 
reactor API is the way to go, unfortunately that's not something I'm 
familiar with and I've been a bit distracted on other things so haven't 
had time to look at that for JavaScript yet. Porting what I've done to 
python's messenger API should work OK though it's just a question if 
whether you want to use an API that isn't getting so much attention.

3. JavaScript is fundamentally asynchronous so I've had to put code in 
place to correlate the QMF requests and responses, as it happens that 
complication was one of the main reason I wanted to put together a demo. 
With python messenger I *think* you could simplify things with 
synchronous requests and responses.

4. I'm not overly familiar with python, but I did liberally crib the 
python messenger binding for the JavaScript one, so I believe that you 
just might get a fair bit of mileage if you look at qpid-config.js as a 
starting point.

HTH,
Frase

On 22/01/16 18:07, Robbie Gemmell wrote:
> On 21 January 2016 at 23:47, Hamza Sheikh <fe...@codeghar.com> wrote:
>> I'm currently using qpid-python, qpid-tools, and qpid-qmf for
>> sending/receiving messages and to get info about/from the Qpid broker
>> (queues, stats, etc.).
>>
>> Unfortunately, qpid-python is Python 2 only and does not support Python 3
>> (can't even pip install). I tried to port it to Python 3 but gave up because
>> (a) code quality is a complete mess, (b) messaging is not my passion, (c) I
>> did not have more time to spend on it.
>>
>> My code depends on these three packages and I can't support Python 3 in my
>> code because of this limitation.
>>
>> Can Proton replace qpid-python, qpid-tools, qpid-qmf for *both* my use
>> cases: (a) read/receive messages and (b) get info from the broker?
>>
>> --
>> Hamza Sheikh
>> Twitter: @aikchar
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
>> For additional commands, e-mail: users-help@qpid.apache.org
>>
> I don't have much experience at all with the python bits components
> but I believe the situation is such that the answer is generally yes,
> you could use proton to send/receive messages and get info from the
> broker, as the QMF tools are essentially sending/receiving
> particularly formatted messages to the broker that you could similarly
> produce/interpret yourself. The older components would have been using
> AMQP 0-10, whereas with Proton you would be using AMQP 1.0, and so
> there could be differences in specific approach due to that.
>
> Robbie
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>


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


Re: Can Proton replace qpid-qmf, qpid-python, qpid-tools?

Posted by Gordon Sim <gs...@redhat.com>.
On 01/22/2016 06:07 PM, Robbie Gemmell wrote:
> On 21 January 2016 at 23:47, Hamza Sheikh <fe...@codeghar.com> wrote:
>> Can Proton replace qpid-python, qpid-tools, qpid-qmf for *both* my use
>> cases: (a) read/receive messages and (b) get info from the broker?

[...]

> I don't have much experience at all with the python bits components
> but I believe the situation is such that the answer is generally yes,
> you could use proton to send/receive messages and get info from the
> broker, as the QMF tools are essentially sending/receiving
> particularly formatted messages to the broker that you could similarly
> produce/interpret yourself.

Just to expand on that, you would essentially need to rewrite the tools 
that are provided in qpid-tools to use proton rather than 
qpid.messaging. The api to qpid.messaging is completely different from 
proton.


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


Re: Can Proton replace qpid-qmf, qpid-python, qpid-tools?

Posted by Robbie Gemmell <ro...@gmail.com>.
On 21 January 2016 at 23:47, Hamza Sheikh <fe...@codeghar.com> wrote:
> I'm currently using qpid-python, qpid-tools, and qpid-qmf for
> sending/receiving messages and to get info about/from the Qpid broker
> (queues, stats, etc.).
>
> Unfortunately, qpid-python is Python 2 only and does not support Python 3
> (can't even pip install). I tried to port it to Python 3 but gave up because
> (a) code quality is a complete mess, (b) messaging is not my passion, (c) I
> did not have more time to spend on it.
>
> My code depends on these three packages and I can't support Python 3 in my
> code because of this limitation.
>
> Can Proton replace qpid-python, qpid-tools, qpid-qmf for *both* my use
> cases: (a) read/receive messages and (b) get info from the broker?
>
> --
> Hamza Sheikh
> Twitter: @aikchar
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

I don't have much experience at all with the python bits components
but I believe the situation is such that the answer is generally yes,
you could use proton to send/receive messages and get info from the
broker, as the QMF tools are essentially sending/receiving
particularly formatted messages to the broker that you could similarly
produce/interpret yourself. The older components would have been using
AMQP 0-10, whereas with Proton you would be using AMQP 1.0, and so
there could be differences in specific approach due to that.

Robbie

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