RabbitMQ C++ Client consumer_cancel_notify -


following guidelines here i'm able set "consumer_cancel_notify" property client connection, when queue deleted client still isn't noticing. i'm guessing have override method or set callback somewhere, after digging through source code i'm lost i'd this. offhand know i'd listen notification?

ok here's how got work:

  1. when creating queue (i.e. "declaring" queue), add callback "amqp_cancel" messages.
  2. inside amqpqueue::sendconsumecommand(), inside while(1) loop code checks different *frame.payload.method.id*s, add check amqp_basic_cancel_method, e.g.

        if (frame.payload.method.id == amqp_basic_cancel_method){         cout << "amqp_basic_cancel_method received" << endl;         if ( events.find(amqp_cancel) != events.end() ) {            (*events[amqp_cancel])(pmessage);         }         continue;     } 

that's it.

for purposes wanted redeclare queue if got deleted keep consuming messages, inside callback redeclared queue, set bindings, added events, set consumer tag, , consumed.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -