Announcement Announcement Module
Collapse
No announcement yet.
Testing Guranteed Delivery Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Good morning Dave.
    As per your suggestion I will run samples and integration tests.

    Thanks
    Venkat

    Comment


    • #17
      Good afternoon Dave.
      The test project I am running is not using log4j. Therefore running spring-amqp components are executed in debug enabled mode by default.
      In org.springframework.amqp.core.Message.getBodyConte ntAsString() method:
      if (MessageProperties.CONTENT_TYPE_SERIALIZED_OBJECT. equals(contentType)) {
      return (String) SerializationUtils.deserialize(body);
      }

      In my case deserialize method is returning DMBMessage object, here it is
      type casting to String. This was throwing ClassCastException.

      This code was made use in: org.springframework.amqp.rabbit.listener.handle() method as follows:
      if (logger.isDebugEnabled()) {
      logger.debug("Received message: " + message);
      }

      As I mentioned earlier that my test code is getting executed in debug enabled mode always and logger.debug() statement was causing ClasscastException. Therefore, my MessageListener is running and not processing any messages that are published to the queue.
      I placed a log4j.properties in the project and set:
      log4j.logger.org.springframework.amqp=ERROR

      After this I could run MessageListener without any problems.
      I have also tested RabbitMQ Broker Hard failure test. Messages are saved to the queue when I bring down the broker. When I bring up the broker and Message Listener, messages are consumed.

      Thanks
      Venkat

      Comment


      • #18
        Dave there was a typo mistake in the following line
        This code was made use in: org.springframework.amqp.rabbit.listener.handle() method as follows:

        The class name I am trying to point is:
        org.springframework.amqp.rabbit.listener.BlockingQ ueueConsumer.handle(Delivery delivery) method.

        Thanks
        Venkat

        Comment


        • #19
          Ah, finally we can make progress. Thanks for finding the bug (https://jira.springsource.org/browse/AMQP-124). You can report bugs yourself in JIRA and then you will be able to track it to completion. Probably we should be more defensive in Message.toString().

          Comment

          Working...
          X