From 9b5440e5a4a381d17e475df377a6eef56812cf83 Mon Sep 17 00:00:00 2001 From: Tomas Hofman Date: Mon, 29 May 2017 12:00:32 +0200 Subject: [PATCH] ARTEMIS-1186 Consumer.receive hangs if http acceptor with non-zero batch-delay is configured --- .../core/remoting/impl/netty/NettyAcceptor.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java index fa2723c5f8..1fde73f864 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java @@ -380,14 +380,14 @@ public class NettyAcceptor extends AbstractAcceptor { notificationService.sendNotification(notification); } - if (batchDelay > 0) { - flusher = new BatchFlusher(); - - batchFlusherFuture = scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, TimeUnit.MILLISECONDS); - } - ActiveMQServerLogger.LOGGER.startedAcceptor(acceptorType, host, port, protocolsString); } + + if (batchDelay > 0) { + flusher = new BatchFlusher(); + + batchFlusherFuture = scheduledThreadPool.scheduleWithFixedDelay(flusher, batchDelay, batchDelay, TimeUnit.MILLISECONDS); + } } @Override