[rabbitmq-discuss] QoS prefetch and rabbitmq-c

Paul Pearcy paul.pearcy at wallst.com
Thu Dec 16 22:10:31 GMT 2010

  Don't see a direct way via rabbitmq-c to setup QoS prefetch count for a consumer. Searching the lists, I came across this thread, which seemed to have a sample for how to do this:

Is rolling your own QoS via amqp_simple_rpc the current recommended (only?) way to do this?


Here is the chunk of code I am referring to:
/* amqp.h should support this */
static int _amqp_basic_qos(amqp_connection_state_t state,
                                   amqp_channel_t channel,
                                   uint32_t prefetch_size,
                                   uint16_t prefetch_count,
                                   amqp_boolean_t global)
  amqp_rpc_reply_t rpc_reply =
    AMQP_SIMPLE_RPC(state, channel, BASIC, QOS, QOS_OK,
                    amqp_basic_qos_t, prefetch_size, prefetch_count, global);

  if (rpc_reply.reply_type != AMQP_RESPONSE_NORMAL)
      return -1;
  return 0;

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20101216/a99d4934/attachment-0001.htm>

More information about the rabbitmq-discuss mailing list