Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-15430

Duplicate Custom RoutePolicyFactory by Camel on SpringBoot

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.9-GA
    • fuse-7.7-GA
    • Camel
    • None
    • False
    • False
    • % %
    • +
    • Undefined
    • Hide
      • Download the attached reproducerreproducer.zip
      • On the root directory, execute following command
      mvn spring-boot:run 
      • Please check the log. There are 2 instances in the CamelContext
       2020-12-09 16:16:46.459 DEBUG 20644 --- [ main] o.example.camel.reproducer.Application : RoutePolicyFactories: [org.example.camel.reproducer.TestRoutePolicyFactory@351f2244, org.example.camel.reproducer.TestRoutePolicyFactory@351f2244]
      • As a result, TestRoutePolicy was invoked 2 times which is not expected
       2020-12-09 16:16:46.475 DEBUG 20644 --- [ main] o.e.camel.reproducer.TestRoutePolicy : Start route test-route.
      2020-12-09 16:16:46.475 DEBUG 20644 --- [ main] o.e.camel.reproducer.TestRoutePolicy : Start route test-route.
      2020-12-09 16:16:46.479 INFO 20644 --- [ main] test-route : Test route invoked.
      Show
      Download the attached reproducer reproducer.zip On the root directory, execute following command mvn spring-boot:run Please check the log. There are 2 instances in the CamelContext 2020-12-09 16:16:46.459 DEBUG 20644 --- [ main] o.example.camel.reproducer.Application : RoutePolicyFactories: [org.example.camel.reproducer.TestRoutePolicyFactory@351f2244, org.example.camel.reproducer.TestRoutePolicyFactory@351f2244] As a result, TestRoutePolicy was invoked 2 times which is not expected 2020-12-09 16:16:46.475 DEBUG 20644 --- [ main] o.e.camel.reproducer.TestRoutePolicy : Start route test-route. 2020-12-09 16:16:46.475 DEBUG 20644 --- [ main] o.e.camel.reproducer.TestRoutePolicy : Start route test-route. 2020-12-09 16:16:46.479 INFO 20644 --- [ main] test-route : Test route invoked.

    Description

      Custom RoutePolicyFactory is added to a CamelContext 2 times, so the same route policy will be invoked 2 times which is not expected.

      The issue occurs with camel on spring boot environment.

      The upstream ticket isĀ CAMEL-15942

      Attachments

        Issue Links

          Activity

            People

              ldemasi Luigi De Masi
              rhn-support-hfuruich Hisao Furuichi
              Francesco Mongiardo Francesco Mongiardo
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: