Skip to content

Commit 8b18e90

Browse files
zysaaagaryrussell
authored andcommitted
GH-1402: SMLC: Fix BlockingQueueConsumer#queue init
1 parent 00854cd commit 8b18e90

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/listener/BlockingQueueConsumer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ public BlockingQueueConsumer(ConnectionFactory connectionFactory,
295295
this.noLocal = noLocal;
296296
this.exclusive = exclusive;
297297
this.queues = Arrays.copyOf(queues, queues.length);
298-
this.queue = new LinkedBlockingQueue<Delivery>(prefetchCount);
298+
this.queue = new LinkedBlockingQueue<Delivery>(queues.length == 0 ? prefetchCount : prefetchCount * queues.length);
299299
}
300300

301301
public Channel getChannel() {

0 commit comments

Comments
 (0)