Greetings,

I tried setting lifetime-policy in qmf request and I do not see any difference.

Then I modified messenger.c (starting from line 1768) and set 'exclusive'
property there on source terminus when creating queue using '#' specifier
as follows:

  if (pn_streq(name, "#")) {
    pn_data_t  *properties;

    if (pn_link_is_sender(link)) {
      pn_terminus_set_dynamic(pn_link_target(link), true);
      properties = pn_terminus_properties(pn_link_target(link));
    } else {
      pn_terminus_set_dynamic(pn_link_source(link), true);
      properties = pn_terminus_properties(pn_link_source(link));
    }
    pn_data_rewind(properties);
    pn_data_next(properties);
    if (pn_data_type(properties) == PN_EOS)
       pn_data_put_map(properties);
    if (pn_data_type(properties) == PN_MAP) {
      static pn_bytes_t _exclusive = { 9, "exclusive" };

      pn_data_enter(properties);
       pn_data_put_symbol(properties, _exclusive);
       pn_data_put_bool(properties, true);
      pn_data_exit(properties);
    }
    else
      pn_logf("%s: unexpected TERMINUS PROPERTIES type [%d], MAP expected",
        __func__, pn_data_type(properties));
    pn_data_rewind(properties);
  } else {
    pn_terminus_set_address(pn_link_target(link), name);
    pn_terminus_set_address(pn_link_source(link), name);
  }

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?

Best regards,

On 04.07.2018 11:26, Gordon Sim wrote:
> On 03/07/18 21:15, Michael Ivanov wrote:
>> Hallo,
>>
>> I'm trying to create a queue using qmf message to qpidd cpp (1.38) as follows
>> (pseudocode, actually pn_data_* functions are used to construct the message):
>>
>>     subject='broker',
>>     correlation_id='1',
>>     reply_to='XXXXXXXXX',
>>     properties={
>>        'method': 'request'
>>        'qmf.opcode': '_method_request',
>>        'x-amqp-0-10.app-id': 'qmf2',
>>     },
>>     content={
>>        '_object_id': {
>>           '_object_name': 'org.apache.qpid.broker:broker:amqp-broker'
>>        },
>>        '_method_name': 'create',
>>        '_arguments': {
>>           'type': 'queue',
>>           'name': u'test',
>>           'strict': True,
>>           'properties': {
>>               'auto-delete': True,
>>           }
>>        }
>>     }
>>
>> Queue is created and auto-delete property is set, but as I understand to make
>> auto deletion actually work 'exclusive' property has to be added. Is it
>> possible using this kind of message? I tried to add 'exclusive': True to
>> message but it did not work.
> 
> Try setting :
> 
> 'qpid.lifetime-policy': 'delete-on-close'
> 
> in the properties?
> 
> 
> ---------------------------------------------------------------------
> 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