org.springframework.messaging.MessageDeliveryException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • During invocation of SimpMessageSendingOperations::convertAndSend method ConcurrentModificationException occures. It happens very rarely (I found out about this bug by checking logs from production, I haven't seen it in application), probably when invocation of this method happens simultaneously with closing webSocket on a client. Here's a stack: {code} org.springframework.messaging.MessageDeliveryException: Failed to handle message to ExecutorSubscribableChannel[brokerChannel] in SimpleBroker[DefaultSubscriptionRegistry[cache[2 destination(s)], registry[2 sessions]]]; nested exception is java.util.ConcurrentModificationException at org.springframework.messaging.support.ExecutorSubscribableChannel$SendTask.run(ExecutorSubscribableChannel.java:180) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.ExecutorSubscribableChannel.sendInternal(ExecutorSubscribableChannel.java:93) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:107) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:94) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.sendInternal(SimpMessagingTemplate.java:185) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:160) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:47) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:95) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:133) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:113) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:108) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at .... [our application stack leading to convertAndSend on SimpMessageSendingOperations object] Caused by: java.util.ConcurrentModificationException: null at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394) ~[na:1.7.0_55] at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405) ~[na:1.7.0_55] at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.sendMessageToSubscribers(SimpleBrokerMessageHandler.java:227) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:183) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:180) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.ExecutorSubscribableChannel$SendTask.run(ExecutorSubscribableChannel.java:172) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] ... 24 common frames omitted {code} Can it be related to this SPR-11755 bug?
    via by Piotr Leśniak,
  • During invocation of SimpMessageSendingOperations::convertAndSend method ConcurrentModificationException occures. It happens very rarely (I found out about this bug by checking logs from production, I haven't seen it in application), probably when invocation of this method happens simultaneously with closing webSocket on a client. Here's a stack: {code} org.springframework.messaging.MessageDeliveryException: Failed to handle message to ExecutorSubscribableChannel[brokerChannel] in SimpleBroker[DefaultSubscriptionRegistry[cache[2 destination(s)], registry[2 sessions]]]; nested exception is java.util.ConcurrentModificationException at org.springframework.messaging.support.ExecutorSubscribableChannel$SendTask.run(ExecutorSubscribableChannel.java:180) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.ExecutorSubscribableChannel.sendInternal(ExecutorSubscribableChannel.java:93) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:107) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:94) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.sendInternal(SimpMessagingTemplate.java:185) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:160) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:47) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:95) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:133) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:113) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:108) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at .... [our application stack leading to convertAndSend on SimpMessageSendingOperations object] Caused by: java.util.ConcurrentModificationException: null at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394) ~[na:1.7.0_55] at java.util.LinkedHashMap$KeyIterator.next(LinkedHashMap.java:405) ~[na:1.7.0_55] at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.sendMessageToSubscribers(SimpleBrokerMessageHandler.java:227) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.broker.SimpleBrokerMessageHandler.handleMessageInternal(SimpleBrokerMessageHandler.java:183) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:180) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.ExecutorSubscribableChannel$SendTask.run(ExecutorSubscribableChannel.java:172) ~[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] ... 24 common frames omitted {code} Can it be related to this SPR-11755 bug?
    via by Piotr Leśniak,
  • if you use {{.enableStompBrokerRelay()}} and you don't have a msg queue running, the logs get bombard by this exception every few mileseconds. {code} org.springframework.messaging.MessageDeliveryException: Message broker is not active. INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler.handleMessageInternal(StompBrokerRelayMessageHandler.java:378) INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:171) INFO [LineHandler-1] [stderr] at org.springframework.messaging.support.ExecutorSubscribableChannel.sendInternal(ExecutorSubscribableChannel.java:64) INFO [LineHandler-1] [stderr] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:116) INFO [LineHandler-1] [stderr] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:98) INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:129) INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:48) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:93) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:146) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:112) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:106) INFO [LineHandler-1] [stderr] at com.dripstat.dripcast.GlobalScoreFirebase$1.onDataChange(GlobalScoreFirebase.java:49) {code}
    via by Prashant Deva,
  • if you use {{.enableStompBrokerRelay()}} and you don't have a msg queue running, the logs get bombard by this exception every few mileseconds. {code} org.springframework.messaging.MessageDeliveryException: Message broker is not active. INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler.handleMessageInternal(StompBrokerRelayMessageHandler.java:378) INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.handleMessage(AbstractBrokerMessageHandler.java:171) INFO [LineHandler-1] [stderr] at org.springframework.messaging.support.ExecutorSubscribableChannel.sendInternal(ExecutorSubscribableChannel.java:64) INFO [LineHandler-1] [stderr] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:116) INFO [LineHandler-1] [stderr] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:98) INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:129) INFO [LineHandler-1] [stderr] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:48) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:93) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:146) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:112) INFO [LineHandler-1] [stderr] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:106) INFO [LineHandler-1] [stderr] at com.dripstat.dripcast.GlobalScoreFirebase$1.onDataChange(GlobalScoreFirebase.java:49) {code}
    via by Prashant Deva,
    • org.springframework.messaging.MessageDeliveryException: Failed to handle message to ExecutorSubscribableChannel[brokerChannel] in SimpleBroker[DefaultSubscriptionRegistry[cache[2 destination(s)], registry[2 sessions]]]; nested exception is java.util.ConcurrentModificationException at org.springframework.messaging.support.ExecutorSubscribableChannel$SendTask.run(ExecutorSubscribableChannel.java:180)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.ExecutorSubscribableChannel.sendInternal(ExecutorSubscribableChannel.java:93)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:107)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:94)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.sendInternal(SimpMessagingTemplate.java:185)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:160)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.simp.SimpMessagingTemplate.doSend(SimpMessagingTemplate.java:47)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:95)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:133)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:113)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE] at org.springframework.messaging.core.AbstractMessageSendingTemplate.convertAndSend(AbstractMessageSendingTemplate.java:108)[spring-messaging-4.1.0.RELEASE.jar:4.1.0.RELEASE]

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,