Results 1 to 10 of 19

Thread: MessageRejectedWhileStoppingException while stopping

Threaded View

  1. #1
    Join Date
    Jun 2009
    Posts
    27

    Default MessageRejectedWhileStoppingException while stopping

    Hi,
    I'm using spring-amqp along with RabbitMQ message broker which receives the messages from the queue and process them. also, I need to manage the incoming traffic from the MessageConsumer which reads from the queue and pass it to the core of application, so I created a InputTrafficMonitor bean which decides whether to stop/start the incoming traffic (from the message consumers) with stop/starting the injected SimpleMessageListenerContainer bean ( with calling the corresponding stop/start methods - I don't know if it's the right way to do that or not);
    so I started a stress-test and found that some messages is being lost in the case of stopping the messageListenerContainer ! I checked the logs and found bunch of MessageRejectedWhileStoppingException s as follows :

    Code:
    2012-10-29 14:55:19,004 WARN  [amqp.rabbit.listener.SimpleMessageListenerContainer:557] - Consumer raised exception, processing can restart if the connection factory supports it. Exception summary: org.springframework.amqp.rabbit.listener.MessageRejectedWhileStoppingException: Message listener container was stopping when a message was received

    I. any clue how to handle/solve this problem ?
    II. is there any better way to pause the incoming traffic from the consumers rather than stop/starting the MessageListenerContainer ?

    thanks in advance
    Last edited by nima; Oct 29th, 2012 at 03:27 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •