This still looks like a normal receive scenario to me.  Since you've
created the queue using the REST API, all you need to do is use the name of
the queue in your client code:

https://github.com/ssorj/equipage/blob/master/qpid-proton-python/receive.py#L40
-
self.address here would be the name of your queue

The main Proton example for this has the same thing, but it's part of a URL:

https://github.com/apache/qpid-proton/blob/master/python/examples/simple_recv.py#L34
-
The path part of self.url would be the name of your queue

There is no need to create a distinct, explicitly named local queue with
Proton.  The library provides that through its API.

Related docs:

http://qpid.apache.org/releases/qpid-proton-0.28.0/proton/python/book/tutorial.html
http://qpid.apache.org/releases/qpid-proton-0.28.0/proton/python/api/proton._reactor.Container-class.html#create_receiver



On Fri, Jun 7, 2019 at 3:47 PM MattR <mattyric...@gmail.com> wrote:

> My apologies for lacking detail. I'm certainly not trying to make anything
> more complicated than I need to.
>
> From my understanding, there is no way to create a queue from the client.
> However, with Broker-J, if trying to subscribe to a non-existent queue,
> then
> Broker-J will create one for you; albeit with a mangled name for the queue
> (e.g. qpidsub_/ID:....). The mangled name was my problem as I needed the
> name to match the binding key so as to prevent unnecessary extra queues
> (i.e. a queue with name "test_queue" could be found in the amq.direct
> exchange with destination and bindingKey both set to "test_queue"). I have
> gotten around this by simply utilizing the REST api to create the queue and
> exchange binding on the fly (based on our current code, this used to be
> possible using the old Python Qpid api's session.declare_queue and
> session.exchange_bind, respectively).
>
> My issue now is that I, essentially, need to be able to do the following in
> Proton:
>
> # Declare a local queue to which we subscribe the reply-to queue
> localQueueName = "producerLocalQueue_" + session.name
> localQueue = session.incoming(localQueueName)
> session.message_subscribe(queue=replyQueueName,
>                           destination=localQueueName)
> localQueue.start()
>
> (ref: https://www.linuxjournal.com/article/10379)
>
> I can't seem to figure out how to mimic the message_subscribe behavior. Is
> that simply creating another receiver passing the reply queue as the source
> and local queue as the target or name?
>
> I apologize in advance if I'm making this over complicated or missing
> something from the docs/api that explain this.
>
> Thanks,
>
> Matt R.
>
>
>
> --
> Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>

Reply via email to