4 Replies Latest reply on Jan 13, 2015 1:06 AM by werrenmi

    Versioning of services with divert

    werrenmi

      Hello together

       

      We are working on a solution for the versioning our service modules. So we think about to use divert for this solution. Our goal is to define a property on each message, so we can define filters on the consumers. So the producer has not directly to be notified when the counterpart (consumer) is available in a new version.

       

      The problem is now, that divert configurations they define the same address in the source as in the forwarding results in a stackoverflow and the transformer is not invoked. Is it not possible to use diverts in that kind?

       

      Regards

      Michel

        • 1. Re: Versioning of services with divert
          jbertram

          So you have a divert whose <address> and <forwarding-address> are the same?  I wouldn't expect that configuration to function properly as messages will be diverted endlessly.  What's the intended goal of such a configuration?

          • 2. Re: Versioning of services with divert
            werrenmi

            Hi Justin

            Sorry for my very late answer. We want to solve the versioning of our consumers via filters. One solution is to replace the producers also when a new version of a consumer comes in action. But this results in maybe unnecessary deployments of modules they contains the producers. So we target a way to update / define the version in message properties on an central point. Here i played around with diverts, but i have noticed that the transformer will only be invoked when the filter condition on the divert configuration is true for a message (different forwarding-address),

             

            I don't found a further way to solve this. We use the core api.

             

            Regards

            Michel

            • 3. Re: Versioning of services with divert
              jbertram

              Take a look at remoting interceptors.  They can intercept and transform messages in arbitrary ways.

              • 4. Re: Versioning of services with divert
                werrenmi

                Thanks a lot Justin! With the remote interceptors it works perfectly.

                 

                Regards

                Michel