1 Reply Latest reply on Jun 3, 2013 10:36 AM by davsclaus

    Messages "disappear" if camel route fabric endpoint resolves to null/blank

    fordm_martin.ford

      Hi,

       

      This question was originally posted on the Camel Forum - it was pointed out that FuseSource would be more appropriate.

       

      The following appears to be a bug  in Fabric, but I wonder whether anyone else has come across this / found a solution?

       

      I've got a fairly simple camel route that uses a recipient list to route messages:

       

       

       

      The getRouteKey process refers to a bean that adds a "routeKey" field to the exchange header, which is then used as a lookup in the fabric registry.

       

      Providing there is a matching routeKey, e.g. fabric:boo, in the registry everything works fine (i.e. I've got a container somewhere in the fabric with a route that consumes from e.g. fabric:boo:activemq:my-boo-to-queue).

       

      However, if there is no matching routeKey, e.g. fabric:foo, then the message just disappears. I can see that a message was enqueued and dequeued on (from) my-from-queue, but that's it. No exception, nothing.

       

      Obviously, I can have the getRouteKey process lookup routeKey in the fabric registry and throw an exception if it's not found, but it seems cleaner to me to have a separate check in the camel route.

       

      Any ideas?