Input queue declaration callback.
        Input Queue/Exchange binding done here

        Args:
            queue: input queue
495501
def on_input_queue_declare(self, queue):
        
        self.in_channel.queue_bind(callback=None,
                                   exchange='input_exc',
                                   queue=self.INPUT_QUEUE_NAME,
                                   routing_key="#")
886996
function processQueue(queue, value) {
            if (!queue || queue.length === 0) return;
            var handler, i = 0;

            while (handler = queue[i++]) {
                handler(value);
            }
        }
166868
def bind_queue!(queue_name, creation_keys, exchange_name, binding_keys, create_policies: false)
      logger.debug("Beetle: creating queue with opts: #{creation_keys.inspect}")
      queue = bunny.queue(queue_name, creation_keys)
      if create_policies
        @dead_lettering.bind_dead_letter_queues!(bunny, @client.servers, queue_name, creation_keys)
      end
      logger.debug("Beetle: binding queue #{queue_name} to #{exchange_name} with opts: #{binding_keys.inspect}")
      queue.bind(exchange(exchange_name), binding_keys)
      queue
    end
1300296
def bind_topic_exchange(self, exchange_name, routing_key, queue_name):
        
        self._channel.queue_declare(
            queue=queue_name,
            auto_delete=True,
            durable=True,
        )
        self._channel.exchange_declare(
            exchange=exchange_name,
            exchange_type='topic',
            auto_delete=True,
        )
        self._channel.queue_bind(
            exchange=exchange_name,
            queue=queue_name,
            routing_key=routing_key
        )
343976
def do_add_queue(self, line):
        

        def f(p, args):
            try:
                target, lsw, queue = args
            except:
                print("argument error")
                print(args)
                return

            # get switch id
            o = p.get()
            capable_switch_id = o.id

            try:
                capable_switch = ofc.OFCapableSwitchType(
                    id=capable_switch_id,
                    resources=ofc.OFCapableSwitchResourcesType(
                        queue=[
                            ofc.OFQueueType(resource_id=queue)
                        ]
                    ),
                    logical_switches=ofc.OFCapableSwitchLogicalSwitchesType(
                        switch=[ofc.OFLogicalSwitchType(
                            id=lsw,
                            resources=ofc.OFLogicalSwitchResourcesType(
                                queue=[queue])
                        )]
                    )
                )
            except TypeError:
                print("argument error")
                return
            try:
                p.edit_config(target, capable_switch)
            except Exception as e:
                print(e)

        self._request(line, f)
29468
protected function createQueueAndBind(RabbitMqOptionTransfer $queueOption, $exchangeQueueName)
    {
        $this->queueEstablishmentHelper->createQueue($this->channel, $queueOption);

        if ($queueOption->getRoutingKeys() === null) {
            return;
        }

        foreach ($queueOption->getRoutingKeys() as $routingKey) {
            $this->bindQueues($queueOption->getQueueName(), $exchangeQueueName, $routingKey);
        }
    }
743507
function _drainQueueStep(queue) {
    var fn = queue.shift();
    if (typeof fn !== "function") {
        fn._settlePromises();
    } else {
        var receiver = queue.shift();
        var arg = queue.shift();
        fn.call(receiver, arg);
    }
}
1028583
def enqueue(trg_queue, item_f, *args, **kwargs):
    '''
    '''
    return venqueue(trg_queue, item_f, args, **kwargs)
1334855
def queue_context_entry(exchange,
                        queue_name,
                        routing=None):
    
    if routing is None:
        routing = queue_name

    queue_entry = QueueContextEntry(mq_queue=queue_name,
                                    mq_exchange=exchange,
                                    mq_routing_key=routing)
    return queue_entry
1268500
def declare(self):
        
        self.backend.exchange_declare(exchange=self.exchange,
                                      type=self.exchange_type,
                                      durable=self.durable,
                                      auto_delete=self.auto_delete)
128040
function(id, msg, result) {
        var q = queues[id], sc;
        if (q && q.onEnd) {
            sc = q.context || q;
            q.onEnd.call(sc, _returnData(q, msg, result));
        }
    }
171785
public void init(String strQueueName, String strQueueType, Object source, Map<String,Object> properties)
    {
        if (strQueueName == null)
            if ((strQueueType == null)
                || (strQueueType.equals(MessageConstants.INTRANET_QUEUE)))
        {
            strQueueType = MessageConstants.INTRANET_QUEUE;
            strQueueName = MessageConstants.RECORD_QUEUE_NAME;
        }
        if (strQueueType == null)
            strQueueType = MessageConstants.INTERNET_QUEUE;
        m_strQueueName = strQueueName;
        m_strQueueType = strQueueType;
        m_source = source;
        
        m_mxProperties = this.createNameValueTree(null, properties);
    }
833037
def _setup(self, inputs):
        logger.info("Setting up the queue for CPU prefetching ...")
        self.input_placehdrs = [build_or_reuse_placeholder(v) for v in inputs]
        assert len(self.input_placehdrs) > 0, \
            "BatchQueueInput has to be used with some input signature!"

        # prepare placeholders without the first dimension
        placehdrs_nobatch = []
        for p in self.input_placehdrs:
            placehdrs_nobatch.append(tfv1.placeholder(
                dtype=p.dtype, shape=p.get_shape().as_list()[1:],
                name=get_op_tensor_name(p.name)[0] + '-nobatch'))

        # dequeue_many requires fully-defined shapes
        shape_err = "Use of BatchQueueInput requires inputs to have fully-defined "
        ""
        shapes = []
        for p in placehdrs_nobatch:
            assert p.get_shape().is_fully_defined(), shape_err
            shapes.append(p.get_shape())

        with self.cached_name_scope():
            if self.queue is None:
                self.queue = tf.FIFOQueue(
                    3000, [x.dtype for x in self.input_placehdrs],
                    shapes=shapes,
                    name='input_queue')
            for shp in self.queue.shapes:
                assert shp.is_fully_defined(), shape_err

            self.thread = EnqueueThread(self.queue, self._inf_ds, placehdrs_nobatch)
1015818
def do_set_queue_config(self, line):
        

        def f(p, args):
            try:
                target, queue, key, value = args
            except:
                print("argument error")
                print(args)
                return

            # get switch id
            o = p.get()
            capable_switch_id = o.id

            try:
                capable_switch = ofc.OFCapableSwitchType(
                    id=capable_switch_id,
                    resources=ofc.OFCapableSwitchResourcesType(
                        queue=[
                            ofc.OFQueueType(
                                resource_id=queue,
                                properties=ofc.OFQueuePropertiesType(
                                    **{key: value})),
                        ]
                    )
                )
            except TypeError:
                print("argument error")
                return
            try:
                p.edit_config(target, capable_switch)
            except Exception as e:
                print(e)

        self._request(line, f)
707261
def queue_bind(self, queue, exchange, routing_key, arguments=None):
        """"""
        return self.channel.queue_bind(queue=queue,
                                       exchange=exchange,
                                       routing_key=routing_key,
                                       arguments=arguments)
216476
public function queueBind($queue, $exchange, $options)
    {
        $args = new Writer();
        $args->writeShort($options['ticket'])
            ->writeShortStr($queue)
            ->writeShortStr($exchange)
            ->writeShortStr($options['routing_key'])
            ->writeBit($options['no_wait'])
            ->writeTable($options['arguments']);
        return $args;
    }
350039
def declare_consuming(self, exchange_name, routing_key, queue_name, callback):
        
        self.bind_topic_exchange(exchange_name, routing_key, queue_name)
        self.declare_basic_consuming(
            queue_name=queue_name,
            callback=callback
        )