Skip to content

Commit 61c0446

Browse files
Z-Beatlesgaryrussell
authored andcommitted
Catch exception when EventSender stopped (#1248)
* Catch exception when EventSender stopped * Add author
1 parent 2a8bb4a commit 61c0446

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-rabbit/src/main/java/org/springframework/amqp/rabbit/logback/AmqpAppender.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
* @author Dominique Villard
9898
* @author Nicolas Ristock
9999
* @author Eugene Gusev
100+
* @author Wayne Chu
100101
*
101102
* @since 1.4
102103
*/
@@ -925,6 +926,9 @@ public void run() {
925926
catch (InterruptedException e) {
926927
Thread.currentThread().interrupt();
927928
}
929+
catch (Exception e) {
930+
addError("Could not send log message, appender is stopped", e);
931+
}
928932
}
929933

930934
private void sendOneEncoderPatternMessage(RabbitTemplate rabbitTemplate, String routingKey) {

0 commit comments

Comments
 (0)