3 Replies Latest reply on Oct 19, 2012 6:05 AM by maxvar

    how to remove messages from deadletter queue after sucess elsewhere

    maxvar Newbie

      I currently have system A connected with system B where A sends an updated document every time it changes in it. The document is sent through a webservice provider deployed in the bus and serving as a route endpoint.

      The set of routes is like this:









      The general document update structure of is stable, but the processor isnot 100% ready to cover for all possibilities that can be exploited in app.A.

      Different exceptions caught in "ProcessTheDocumentBasedOnCurrentUnderstandingHowTheUniverseRuns" lead to the message being routed to one of three queues:

      BadPartnersData - it indicates that something related to Partners details is not OK in App.A and (only manual) corrections should be done there. The messages are looked through and forwarded to stuff responsible to process data changes in App.A.

      NotImplementedYet - when the processor understands that something is missing in it and needs code improvement from developers.

      OtherUnpredictedTroubles is a genereal-purpose deadletter queue when something cannot be reprocessed in any number or retries.


      After changes of partners data in App.A or improvement in the processor component code the updated document (or maybe the same one) is sent (or pushed) from App.A to the web-service again.

      If the result of ProcessTheDocumentBasedOnCurrentUnderstandingHowTheUniverseRuns is then OK then it makes sense to remove all the badmail related to the document from BadPartnersData, NotImplementedYet, OtherUnpredictedTroubles. I think activemq correlation id based on persistent document ID can somehow be used for this.


      The question is how to implement it using Camel. I did not find a similar case in the samples or Google search.

      Maybe I need not a change in Java code but a different point of view on the subject?