Skip to content

Commit

Permalink
Fix RabbitUtils for actual reason when cannot declare exchange
Browse files Browse the repository at this point in the history
(cherry picked from commit 949bf52)
  • Loading branch information
artembilan authored and spring-builds committed Oct 3, 2024
1 parent c325159 commit 60f30b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ public static boolean isExchangeDeclarationFailure(Exception e) {
}
else {
Method shutdownReason = sig.getReason();
return shutdownReason instanceof AMQP.Connection.Close closeReason
&& AMQP.COMMAND_INVALID == closeReason.getReplyCode()
return shutdownReason instanceof AMQP.Channel.Close closeReason
&& AMQP.PRECONDITION_FAILED == closeReason.getReplyCode()
&& closeReason.getClassId() == EXCHANGE_CLASS_ID_40
&& closeReason.getMethodId() == DECLARE_METHOD_ID_10;
}
Expand Down

0 comments on commit 60f30b9

Please sign in to comment.