From 6b5c84a0b506cb03c6740f0d6ffe6452b02770c1 Mon Sep 17 00:00:00 2001 From: Oleg Smelov Date: Mon, 8 Jul 2024 14:30:23 +0400 Subject: [PATCH] rollback debug changes --- .../impl/rabbitmq/connection/ConnectionManager.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/exactpro/th2/common/schema/message/impl/rabbitmq/connection/ConnectionManager.java b/src/main/java/com/exactpro/th2/common/schema/message/impl/rabbitmq/connection/ConnectionManager.java index 7ce276be..d69e96b3 100644 --- a/src/main/java/com/exactpro/th2/common/schema/message/impl/rabbitmq/connection/ConnectionManager.java +++ b/src/main/java/com/exactpro/th2/common/schema/message/impl/rabbitmq/connection/ConnectionManager.java @@ -467,12 +467,7 @@ private void closeConnection(Connection connection, int timeout) { public void basicPublish(String exchange, String routingKey, BasicProperties props, byte[] body) throws IOException, InterruptedException { ChannelHolder holder = getOrCreateChannelFor(PinId.forRoutingKey(exchange, routingKey), publishConnection); holder.retryingPublishWithLock(configuration, body, - (channel, payload) -> { - long start = System.currentTimeMillis(); - channel.basicPublish(exchange, routingKey, props, payload); - long delay = System.currentTimeMillis() - start; - LOGGER.error("delay = {}", delay); - }); + (channel, payload) -> channel.basicPublish(exchange, routingKey, props, payload)); } public String queueDeclare() throws IOException { @@ -919,7 +914,7 @@ public void retryingPublishWithLock(ConnectionManagerConfiguration configuration } catch (IOException | ShutdownSignalException e) { var currentValue = iterator.next(); var recoveryDelay = currentValue.getDelay(); - LOGGER.error("Retrying publishing #{}, waiting for {}ms. Reason: {}", currentValue.getTryNumber(), recoveryDelay, e); + LOGGER.warn("Retrying publishing #{}, waiting for {}ms. Reason: {}", currentValue.getTryNumber(), recoveryDelay, e); TimeUnit.MILLISECONDS.sleep(recoveryDelay); // cleanup after failure publishConfirmationListener.remove(msgSeq);