Skip to content

Commit

Permalink
Adding prefetch=1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm authored Dec 30, 2017
1 parent bdbad64 commit 5f2ada9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/com/happyr/mq2php/queue/RabbitMqClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public RabbitMqClient(String queueName, MessageConsumer mc) {
channel = connection.createChannel();

channel.queueDeclare(queueName, true, false, false, null);
channel.basicQos(1);

consumer = new QueueingConsumer(channel);
channel.basicConsume(queueName, false, consumer);
Expand Down

0 comments on commit 5f2ada9

Please sign in to comment.