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

InterceptStrategy in camel 2.21.0 version of Fabric BOM 3.0.11.fuse-000039-redhat-1 does not print details of all endpoints

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.1
    • fuse-7.0
    • Camel
    • None
    • Fuse 7.1 Sprint 32

    Description

      There is a reproducer attached on the support case.

      • Camel's InterceptStrategy has been used to wrap all endpoints to make global logging.
        There is a custom interceptor that wraps certain endpoints (inputs and outputs) for logging, using the LoggingInterceptStrategy and LoggingInterceptor classes. We can see from the debug output that the LoggingInterceptor instances are correctly wrapping all the endpoints when the routes build. However when a message is sent through, only one route does any logging. The process method of the other interceptor instances are never called.
      • To see the issue please run the testEndToEnd test in ProposalSaveIntegrationTest (it's the only test so just running "mvn test" will have the same effect). You will see that the LoggingInterceptStrategy creates nine LoggingInterceptor instances. However only two of them are called, the output with "After receiving message from endpoint *****", and "Before" / "After sending message to endpoint *****" in the text. If you change the version of Fabric8 in the POM to to the Fuse 6.3 version (use commented value in <properties>) then it works as expected, logging from all six endpoints (not all nine endpoints are called by this test).

      Here are the test results we see,

      1. mvn:test using Fabric8 version 2.2.170.redhat-000023

      18:49:16.613 INFO  ProposalRoute - ****************** LoggingInterceptor **************************:1
      18:49:16.613 INFO  ProposalRoute - ****************** LoggingInterceptor Input count *********:1
      18:49:16.613 INFO  ProposalRoute - After receiving message from endpoint activemq://queue:Consumer.Proposal.VirtualTopic.Events?transacted=true&cacheLevelName=CACHE_CONSUMER
      18:49:16.632 INFO  ProposalRoute - Received application with event type applicationChanged and ARN 82051779
      18:49:16.633 INFO  ProposalRoute - JMSXGroupID: 
      18:49:16.854 INFO  GetVehicleProfileRoute - Received message with profile code 8EVC
      18:49:16.854 INFO  GetVehicleProfileRoute - ****************** LoggingInterceptor **************************:2
      18:49:16.854 INFO  GetVehicleProfileRoute - ****************** LoggingInterceptor Input count *********:1
      18:49:16.854 INFO  GetVehicleProfileRoute - Before sending message to endpoint netty4-http://http://localhost:10001/api/v1/vehicle-profiles/${header.vehicleProfileCode}
      18:49:17.141 INFO  GetVehicleProfileRoute - After sending message to endpoint netty4-http://http://localhost:10001/api/v1/vehicle-profiles/${header.vehicleProfileCode}
      18:49:17.227 INFO  / - RequestHandlerClass from context returned com.github.tomakehurst.wiremock.http.StubRequestHandler. Normalized mapped under returned 'null'
      18:49:17.516 INFO  GetManufacturerRoute - Received message with ARN 82051779, for manufacturer enrichment
      18:49:17.517 INFO  GetManufacturerRoute - ****************** LoggingInterceptor **************************:3
      18:49:17.517 INFO  GetManufacturerRoute - ****************** LoggingInterceptor Input count *********:2
      18:49:17.517 INFO  GetManufacturerRoute - Before sending message to endpoint cxf://bean:thirdPartyService?defaultOperationName=listThirdPartysForExternalReference
      18:49:17.617 INFO  GetManufacturerRoute - After sending message to endpoint cxf://bean:thirdPartyService?defaultOperationName=listThirdPartysForExternalReference
      18:49:17.751 INFO  getCustomerRouteId - Received message with customer CRN 
      18:49:17.782 INFO  ProposalRoute - ****************** LoggingInterceptor **************************:4
      18:49:17.782 INFO  ProposalRoute - ****************** LoggingInterceptor Input count *********:3
      18:49:17.782 INFO  ProposalRoute - Before sending message to endpoint activemq://queue:ProposalSave
      18:49:17.838 INFO  ProposalRoute - After sending message to endpoint activemq://queue:ProposalSave
      18:49:17.838 INFO  ProposalSaveRoute - ****************** LoggingInterceptor **************************:5
      18:49:17.838 INFO  ProposalSaveRoute - ****************** LoggingInterceptor Input count *********:2
      18:49:17.839 INFO  ProposalSaveRoute - After receiving message from endpoint activemq://queue:ProposalSave?transacted=true&cacheLevelName=CACHE_CONSUMER
      18:49:17.842 INFO  ProposalSaveRoute - In ProposalSaveRoute
      18:49:17.863 INFO  ProposalSaveRoute - ****************** LoggingInterceptor **************************:6
      18:49:17.863 INFO  ProposalSaveRoute - ****************** LoggingInterceptor Input count *********:4
      18:49:17.863 INFO  ProposalSaveRoute - Before sending message to endpoint cxf://bean:proposalService?defaultOperationName=save
      18:49:17.874 INFO  ProposalSaveRoute - After sending message to endpoint cxf://bean:proposalService?defaultOperationName=save
      18:49:18.960 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - ********************************************************************************
      18:49:18.960 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - Testing done: testEndToEnd(uk.co.mo.proposal.service.ProposalSaveIntegrationTest)
      18:49:18.961 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - Took: 2.801 seconds (2801 millis)
      18:49:18.961 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - ********************************************************************************
      

      2. mvn:test using Fabric8 version 3.0.11.fuse-000039-redhat-1 - missing intercepts from several endpoints:

      18:50:42.201 INFO  ProposalRoute - ****************** LoggingInterceptor **************************:1
      18:50:42.201 INFO  ProposalRoute - ****************** LoggingInterceptor Input count *********:1
      18:50:42.201 INFO  ProposalRoute - After receiving message from endpoint activemq://queue:Consumer.Proposal.VirtualTopic.Events?transacted=true&cacheLevelName=CACHE_CONSUMER
      18:50:42.217 INFO  ProposalRoute - Received application with event type applicationChanged and ARN 82051779
      18:50:42.218 INFO  ProposalRoute - JMSXGroupID: 
      18:50:42.492 INFO  GetVehicleProfileRoute - Received message with profile code 8EVC
      18:50:42.783 INFO  / - RequestHandlerClass from context returned com.github.tomakehurst.wiremock.http.StubRequestHandler. Normalized mapped under returned 'null'
      18:50:43.024 INFO  GetManufacturerRoute - Received message with ARN 82051779, for manufacturer enrichment
      18:50:43.239 INFO  getCustomerRouteId - Received message with customer CRN 
      18:50:43.271 INFO  ProposalRoute - ****************** LoggingInterceptor **************************:2
      18:50:43.272 INFO  ProposalRoute - ****************** LoggingInterceptor Input count *********:1
      18:50:43.272 INFO  ProposalRoute - Before sending message to endpoint activemq://queue:ProposalSave
      18:50:43.282 INFO  ProposalSaveRoute - In ProposalSaveRoute
      18:50:43.280 INFO  ProposalRoute - After sending message to endpoint activemq://queue:ProposalSave
      18:50:45.405 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - ********************************************************************************
      18:50:45.405 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - Testing done: testEndToEnd(uk.co.mo.proposal.service.ProposalSaveIntegrationTest)
      18:50:45.406 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - Took: 3.624 seconds (3624 millis)
      18:50:45.406 INFO  u.c.m.p.s.ProposalSaveIntegrationTest - ********************************************************************************
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.291 sec - in uk.co.mo.proposal.service.ProposalSaveIntegrationTest
      

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tasato Tadayoshi Sato
              rhn-support-vgohel Viral Gohel
              Tomas Turek Tomas Turek
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: