3 Replies Latest reply on Apr 23, 2012 7:58 AM by davsclaus

    Camel 2.8 JMS consumer doesn't remove consumed messages

    simplex-software

      Greeting,

       

      I have the following Camel route:

       

           

      The bean named fileToJmsConsumer consumes messages as it logs them correctly but messages still remain in the ActiveMQ queue. Also, the ActiveMQ console doesn't show any consumer for the queue. Is there any additional configuration parameter I need to use ?

       

      Many thanks in advance,

       

      Nicolas DUMINIL

        • 1. Re: Camel 2.8 JMS consumer doesn't remove consumed messages
          davsclaus

          You are doing a InOnly send to the JMS endpoint.

          And therefore Camel will send the message to the JMS destination, and then continue routing the message.

           

          As you send non persistent message, the broker will discard the message if there is no consumers. You need to have an existing and active consumer alive to pickup the message.

           

          Maybe this is not what you want. But you want to do request/reply over JMS?

          Then you need to have a consumer of the incomingFiles queue which can pickup the message, process it, and send back a reply message.

          And you would need to configure Camel to use InOut pattern.

           

           

          • 2. Re: Camel 2.8 JMS consumer doesn't remove consumed messages
            simplex-software

            Hi,

             

            I'm not sure I understand. Yes, I'm doin an InOnly send, this is what I want. And yes, I have a consumer, the bean that you can see in the route. This bean consumes the message as it displays it in the log file. And no, I don't want to do request/response but I just want that my message disapear from the queue when it was consumed. But the message stays in the queue, it appears in the console, while there is a JMS consumer for it, which consumes it. I'm confused. Is there anything wrong with the route ?

             

            Kind regards,

             

            Nicolas DUMINIL

            • 3. Re: Camel 2.8 JMS consumer doesn't remove consumed messages
              davsclaus

              The bean in the route at