Skip to content

Commit

Permalink
Removing superfluous amqp_basic_qos() calls to address php-amqp#53
Browse files Browse the repository at this point in the history
  • Loading branch information
lstrojny committed May 9, 2013
1 parent e785ad4 commit 2c6df29
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions amqp_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -885,15 +885,6 @@ PHP_METHOD(amqp_queue_class, get)
connection = AMQP_GET_CONNECTION(channel);
AMQP_VERIFY_CONNECTION(connection, "Could not get messages from queue.");

/* Set the QOS for this channel to only pull off one message at a time */
amqp_basic_qos(
connection->connection_resource->connection_state,
channel->channel_id,
0, /* prefetch window size */
1, /* prefetch message count */
0 /* global flag */
);

/* Build basic.get request */
s.ticket = 0,
s.queue = amqp_cstring_bytes(queue->name);
Expand All @@ -911,15 +902,6 @@ PHP_METHOD(amqp_queue_class, get)
MAKE_STD_ZVAL(message);
read = read_message_from_channel(connection->connection_resource->connection_state, message TSRMLS_CC);

/* Set the QOS back to what the user requested at the beginning */
amqp_basic_qos(
connection->connection_resource->connection_state,
channel->channel_id,
channel->prefetch_size, /* prefetch window size */
channel->prefetch_count, /* prefetch message count */
0 /* global flag */
);

if (read == AMQP_READ_SUCCESS) {
COPY_PZVAL_TO_ZVAL(*return_value, message);
} else {
Expand Down

0 comments on commit 2c6df29

Please sign in to comment.