You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Gordon Sim <gs...@redhat.com> on 2018/08/01 10:21:26 UTC

Re: Temporary queues deletion

On 31/07/18 21:21, Michael Ivanov wrote:
> Then I modified messenger.c (starting from line 1768) and set 'exclusive'
> property there on source terminus when creating queue using '#' specifier
[...]
> And after that I have seen that my temporary queues started to be created
> in exclusive mode, at least qpid-stat shows this:
> 
>    queue                                        dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
>    ==========================================================================================================================
>    21948F78- . . . -70568712B_receiver-27663.0       Y        Y        1     1      0     435    435        0         1     1
> 
> But after clien program that has created this queue termionated, the queue regrettably
> was not deleted, but "exclusive" property was dropped instead:
> 
>    queue                                        dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
>    ==========================================================================================================================
>    21948F78- . . . -70568712B_receiver-27663.0       Y                 0     1      1       0    435      435         0     1
> 
> Setting lifetime-property to delete-on-close in same way also does not make
> any difference.
> 
> Any hope to get temporary queue deleted without terminating server (responder)
> process?

How are you setting the lifetime-policy? It needs to be encoded as a 
described value. E.g. the trace would be something like this:

> @attach(18) [name="97e94a05-1e69-492f-b9b4-282beb79484e#_aafc09ac-efc1-4f51-b038-c529408b7b61", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=true, dynamic-node-properties={:"lifetime-policy"=@:"amqp:delete-on-close:list" []}], target=@target(41) [durable=0, timeout=0, dynamic=false], initial-delivery-count=0, max-message-size=0]

When I do that (I did this using a different client), then the broker 
will indeed delete that queue when the receiver exits. The sender is 
still open at that point, but it gets a detach informing it that the 
queue is deleted.

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


Re: Temporary queues deletion

Posted by Michael Ivanov <iv...@logit-ag.de>.
YES!!!

Now temporary queues are deletes as expected!
Huge thanks for help!

Do you think the fix should be included in proton mainline?
Just in case the patch is attached.

Best regards,

On 01.08.2018 14:03, Gordon Sim wrote:
> On 01/08/18 11:44, Michael Ivanov wrote:
>> Currently I have the following:
>>
>>    [0x55da51103a80]:  -> AMQP
>>    [0x55da51103a80]:0 -> @open(16) [container-id="03F84325-E282-4535-800D-637EB4383871", hostname="localhost", channel-max=32767]
>>    [0x55da51103a80]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
>>    [0x55da51103a80]:0 -> @attach(18) [name="receiver-29591.0", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0,
>> source=@source(40) [durable=0, expiry-policy=:"link-detach", timeout=1000, dynamic=true,
>> dynamic-node-properties={:"lifetime-policy"="delete-on-close", :exclusive=true}], target=@target(41) [durable=0,
>> expiry-policy=:"link-detach", timeout=1000, dynamic=false], initial-delivery-count=0, max-message-size=0]
> 
> That looks like you are setting the value to the string 'delete-on-close'. It should instead by a described list, e.g. something
> like:
> 
>     static pn_bytes_t _symbol = { 25, "amqp:delete-on-close:list" };
>     pn_data_put_described(data);
>     pn_data_enter(data);
>     pn_data_put_symbol(data, _symbol);
>     pn_data_put_list(data);
>     pn_data_exit(data);
> 
> (Alternatively, you can try patching your broker with the attached patch that I think should fix the handling of the exclusive
> option.)
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 


-- 
 \   / |			           |
 (OvO) |  Mikhail Iwanow                   |
 (^^^) |      Voice:   +7 (911) 223-1300   |
  \^/  |      E-mail:  ivans@logit-ag.de   |
  ^ ^  |                                   |

Re: Temporary queues deletion

Posted by Gordon Sim <gs...@redhat.com>.
On 01/08/18 11:44, Michael Ivanov wrote:
> Currently I have the following:
> 
>    [0x55da51103a80]:  -> AMQP
>    [0x55da51103a80]:0 -> @open(16) [container-id="03F84325-E282-4535-800D-637EB4383871", hostname="localhost", channel-max=32767]
>    [0x55da51103a80]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
>    [0x55da51103a80]:0 -> @attach(18) [name="receiver-29591.0", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0,
> source=@source(40) [durable=0, expiry-policy=:"link-detach", timeout=1000, dynamic=true,
> dynamic-node-properties={:"lifetime-policy"="delete-on-close", :exclusive=true}], target=@target(41) [durable=0,
> expiry-policy=:"link-detach", timeout=1000, dynamic=false], initial-delivery-count=0, max-message-size=0]

That looks like you are setting the value to the string 
'delete-on-close'. It should instead by a described list, e.g. something 
like:

     static pn_bytes_t _symbol = { 25, "amqp:delete-on-close:list" };
     pn_data_put_described(data);
     pn_data_enter(data);
     pn_data_put_symbol(data, _symbol);
     pn_data_put_list(data);
     pn_data_exit(data);

(Alternatively, you can try patching your broker with the attached patch 
that I think should fix the handling of the exclusive option.)

Re: Temporary queues deletion

Posted by Michael Ivanov <iv...@logit-ag.de>.
Currently I have the following:

  [0x55da51103a80]:  -> AMQP
  [0x55da51103a80]:0 -> @open(16) [container-id="03F84325-E282-4535-800D-637EB4383871", hostname="localhost", channel-max=32767]
  [0x55da51103a80]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
  [0x55da51103a80]:0 -> @attach(18) [name="receiver-29591.0", handle=0, role=true, snd-settle-mode=2, rcv-settle-mode=0,
source=@source(40) [durable=0, expiry-policy=:"link-detach", timeout=1000, dynamic=true,
dynamic-node-properties={:"lifetime-policy"="delete-on-close", :exclusive=true}], target=@target(41) [durable=0,
expiry-policy=:"link-detach", timeout=1000, dynamic=false], initial-delivery-count=0, max-message-size=0]

  [0x55da51103a80]:  <- AMQP
  [0x55da51103a80]:0 <- @open(16) [container-id="c8c172cf-5753-4169-9939-05f63eb56dc5", channel-max=32767,
offered-capabilities=@PN_SYMBOL[:"ANONYMOUS-RELAY"], properties={:product="qpid-cpp", :version="1.38.0", :platform="Linux",
:host="island"}]
  [0x55da51103a80]:0 <- @begin(17) [remote-channel=0, next-outgoing-id=0, incoming-window=2147483647, outgoing-window=2147483647]
  [0x55da51103a80]:0 <- @attach(18) [name="receiver-29591.0", handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0,
source=@source(40) [address="03F84325-E282-4535-800D-637EB4383871_receiver-29591.0", durable=0, timeout=0, dynamic=false,
dynamic-node-properties={:"supported-dist-modes"="move", :"lifetime-policy"=@:"amqp:delete-on-no-links:list" [],
:exclusive=true}, distribution-mode=:move], target=@target(41) [durable=0, timeout=0, dynamic=false], initial-delivery-count=0,
max-message-size=0]

delete-on-close is replaced by delete-on-no-links in response for some reason.
I'm using qpidd 1.38

Best regards,

On 01.08.2018 13:21, Gordon Sim wrote:
> On 31/07/18 21:21, Michael Ivanov wrote:
>> Then I modified messenger.c (starting from line 1768) and set 'exclusive'
>> property there on source terminus when creating queue using '#' specifier
> [...]
>> And after that I have seen that my temporary queues started to be created
>> in exclusive mode, at least qpid-stat shows this:
>>
>>    queue                                        dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
>>    ==========================================================================================================================
>>    21948F78- . . . -70568712B_receiver-27663.0       Y        Y        1     1      0     435    435        0         1     1
>>
>> But after clien program that has created this queue termionated, the queue regrettably
>> was not deleted, but "exclusive" property was dropped instead:
>>
>>    queue                                        dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
>>    ==========================================================================================================================
>>    21948F78- . . . -70568712B_receiver-27663.0       Y                 0     1      1       0    435      435         0     1
>>
>> Setting lifetime-property to delete-on-close in same way also does not make
>> any difference.
>>
>> Any hope to get temporary queue deleted without terminating server (responder)
>> process?
> 
> How are you setting the lifetime-policy? It needs to be encoded as a described value. E.g. the trace would be something like this:
> 
>> @attach(18) [name="97e94a05-1e69-492f-b9b4-282beb79484e#_aafc09ac-efc1-4f51-b038-c529408b7b61", handle=0, role=true,
>> snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [durable=0, timeout=0, dynamic=true,
>> dynamic-node-properties={:"lifetime-policy"=@:"amqp:delete-on-close:list" []}], target=@target(41) [durable=0, timeout=0,
>> dynamic=false], initial-delivery-count=0, max-message-size=0]
> 
> When I do that (I did this using a different client), then the broker will indeed delete that queue when the receiver exits. The
> sender is still open at that point, but it gets a detach informing it that the queue is deleted.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 


-- 
 \   / |			           |
 (OvO) |  Mikhail Iwanow                   |
 (^^^) |      Voice:   +7 (911) 223-1300   |
  \^/  |      E-mail:  ivans@logit-ag.de   |
  ^ ^  |                                   |

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