It worked!

Well almost. The correct 'delete-on-close' entry should look as follows:

   Described(symbol('amqp:delete-on-close:list'), [])

It seems it does not do implicit conversion of string to symbol when passed
as argument to Described()

Thanks and regards!

On 14.05.2020 13:22, Gordon Sim wrote:
> On 14/05/2020 10:29 am, Michael Ivanov wrote:
>> Hallo,
>>
>> I observe strange thing when using temporary queues in client.py script.
>> I assign delete-on-close policy to temporary queue as follows:
>>
>>     options=DynamicNodeProperties({"lifetime-policy" : 
>> ['amqp:delete-on-close:list', []], "exclusive" : True })
>>
>> But when I check the trace I see that delete-on-close is replaced by 
>> delete-on-no-link:
>>
>>     [0x1759b60]:0 <- @attach(18) 
>> [name="67234240-c66b-4936-9498-e0e66013b355-6d4569a2-f9f7-43c1-b87a-6f99976e81d9",
>>  handle=1,
>> role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
>> [address="67234240-c66b-4936-9498-e0e66013b355_67234240-c66b-4936-9498-e0e66013b355-6d4569a2-f9f7-43c1-b87a-6f99976e81d9",
>> 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]
>>
>> When I assign same property in c++ code it is shown in trace correctly:
>>
>>     [0xb37260]:0 <- @attach(18) [name="receiver-10599.0", handle=0, 
>> role=false, snd-settle-mode=2, rcv-settle-mode=0,
>> source=@source(40) 
>> [address="EB39BD71-C919-4936-A7C9-65334513620D_receiver-10599.0", durable=0, 
>> timeout=0, dynamic=false,
>> dynamic-node-properties={:"supported-dist-modes"="move", 
>> :"lifetime-policy"=@:"amqp:delete-on-close:list" [], :exclusive=true},
>> distribution-mode=:move], target=@target(41) [durable=0, timeout=0, 
>> dynamic=false], initial-delivery-count=0, max-message-size=0]
>>
>> I grepped through proton 0.28 code for 'delete-' tokens but did not find 
>> anything
>> that looked like delete-on-close replacement.
>>
>> Can you help me to find where the replacement occurs in python?
> 
> It is not being replaced, but your attempt to set it is failing as it needs 
> to be a described type, and the default is used
> instead.
> 
> Replace
> 
>   ['amqp:delete-on-close:list', []]
> 
> with
> 
>   Described('amqp:delete-on-close:list', [])
> 
> (The Described type is imported from the base proton module)
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
> 


-- 
 \   / |                                   |
 (OvO) |  Михаил Иванов                    |
 (^^^) |      Тел.:    +7(911) 223-1300    |
  \^/  |      E-mail:  iv...@isle.spb.ru   |
  ^ ^  |                                   |

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

Reply via email to