Skip to content

Commit

Permalink
rollback debug changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleg Smelov committed Jul 8, 2024
1 parent 2acea6e commit 6b5c84a
Showing 1 changed file with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 6b5c84a

Please sign in to comment.