You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by timjbanyas <ti...@netapp.com> on 2017/12/01 14:34:10 UTC

Re: How can clients create a queue using AMQP 1.0?

Thanks a lot for the responses.

So, what I gather from these responses and Justin's linked example is that
we need to set the source options when we create the receiver (consumer).

Source options include:
- address
- durability
- timeout
- expiry_policy
- distribution_mode
- dynamic
- filter

Looking at the AMQP 1.0 spec, this looks to correspond to section 3.5.3
(Source)

<type name="source" class="composite" source="list" provides="source">
    <descriptor name="amqp:source:list" code="0x00000000:0x00000028"/>
    <field name="address" type="*" requires="address"/>
    <field name="durable" type="terminus-durability" default="none"/>
    <field name="expiry-policy" type="terminus-expiry-policy"
default="session-end"/>
    <field name="timeout" type="seconds" default="0"/>
    <field name="dynamic" type="boolean" default="false"/>
    <field name="dynamic-node-properties" type="node-properties"/>
    <field name="distribution-mode" type="symbol"
requires="distribution-mode"/>
    <field name="filter" type="filter-set"/>
    <field name="default-outcome" type="*" requires="outcome"/>
    <field name="outcomes" type="symbol" multiple="true"/>
    <field name="capabilities" type="symbol" multiple="true"/>
</type>

Now we just have find a way to set these lower level source options from
within the QpidJMS library, since it seems to hide these lower level
options, as far as we can tell.

Does the above summary sound right?

Thanks,

Tim Banyas



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: How can clients create a queue using AMQP 1.0?

Posted by Gordon Sim <gs...@redhat.com>.
On 01/12/17 21:56, tomt wrote:
> I have successfully managed to create a durable queue with a binding to an
> exchange through QpidJMS when I connect directly to the broker using the
> Session.createDurableConsumer() API.  This is great progress for us.  It
> appears that queue is going to live forever, which we do not want.
> 
> When I try to connect the same client to the qdrouter (who is linked to the
> broker), a queue with a different name is created, but the binding to the
> desired exchange/topic is still created.  I noticed that when my client
> disconnects, this queue is deleted and the dispatcher logs a message that
> the link is aborted because the connection is lost.
> 
> In both of these cases, we are targeting the ability for the queue and
> binding to stay alive after a client disconnects for a certain period of
> time, potentially still accumulating messages.  If the client doesn't
> reconnect in a few minutes, the queue should just be automatically deleted
> by the broker.
> 
> Is this something I can do through the QpidJMS interface?  Would I need to
> drop down to the proton-j level?

I don't think the JMS API lets you control the timeout, no. That is 
probably something to configure on the broker side (in a broker 
dependent way).

For the c++ broker you can create a 'topic' object (a confusing name for 
a sort of wrapper around an exchange that can only be used in AMQP 1.0) 
with a default value for the qpid.auto_delete_timeout (which is then 
'inherited' by all subscriptions that don't provide their own value). 
The auto_delete_timeout is the number of seconds a subscription queue is 
kept for while the consumer is not attached.

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


Re: How can clients create a queue using AMQP 1.0?

Posted by tomt <tt...@netapp.com>.
I have successfully managed to create a durable queue with a binding to an
exchange through QpidJMS when I connect directly to the broker using the
Session.createDurableConsumer() API.  This is great progress for us.  It
appears that queue is going to live forever, which we do not want.

When I try to connect the same client to the qdrouter (who is linked to the
broker), a queue with a different name is created, but the binding to the
desired exchange/topic is still created.  I noticed that when my client
disconnects, this queue is deleted and the dispatcher logs a message that
the link is aborted because the connection is lost.

In both of these cases, we are targeting the ability for the queue and
binding to stay alive after a client disconnects for a certain period of
time, potentially still accumulating messages.  If the client doesn't
reconnect in a few minutes, the queue should just be automatically deleted
by the broker.

Is this something I can do through the QpidJMS interface?  Would I need to
drop down to the proton-j level?



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: How can clients create a queue using AMQP 1.0?

Posted by Gordon Sim <gs...@redhat.com>.
On 01/12/17 14:34, timjbanyas wrote:
> Now we just have find a way to set these lower level source options from
> within the QpidJMS library, since it seems to hide these lower level
> options, as far as we can tell.

Just use the JMS API for durable subscriptions, the client will set the 
necessary AMQP options.

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