3 Replies Latest reply on Sep 28, 2014 8:08 AM by Tomohisa igarashi

    Message collation

    Dennis Bohnstedt Hansen Newbie

      Hi

       

      Im trying to collate certain messages during a Switchyard flow, but can't find any information on the subject. I've looked at the Message trace for my flow and found that there is genrated a new org.switchyard.messageId for each service in the flow.

       

      The breadcrumbId seemed to be unique for the entire flow, but then i discovered a message trace that looked like this, where there was suddenly two different breadcrumbs (breadcrumbId and breadcrumbid) and two message Id's (org.switchyard.messageId and org.switchyard.messageid). The lowercase ones might show up due to a Camel split, bit i would still like to ensure that they are collated with the rest of the messages.

       

      What would be the best approach to do this? I'd like to avoid having to generate a UUID myself, i the start of all my flows :-(

       

      ------- Begin Message Trace -------

      Consumer -> {urn:dk.miracle.dtgroup:MediusIntegration:1.0}ReplaceBodyContent/FileRouterService

      Provider -> {urn:dk.miracle.dtgroup:MediusIntegration:1.0}FileRouterService

      Operation -> routeFile

      MEP -> IN_ONLY

      Phase -> IN

      State -> OK

      Exchange Context ->

          CamelBatchComplete ...............................: true

          CamelBatchIndex ..................................: 0

          CamelBatchSize ...................................: 1

          CamelCreatedTimestamp ............................: Fri Sep 26 13:21:21 CEST 2014

          CamelFailureEndpoint .............................: direct://%7Burn:dk.miracle.dtgroup:MediusIntegration:1.0%7DReplaceBodyContent/FileRouterService

          CamelFileExchangeFile ............................: GenericFile[/temp/dtgroup/aspect4/out/Purchaseorders/Purchaseorder_IG00452171.XML]

          CamelFileLockFileAcquired ........................: true

          CamelFilterMatched ...............................: false

          CamelToEndpoint ..................................: direct://%7Burn:dk.miracle.dtgroup:MediusIntegration:1.0%7DReplaceBodyContent/FileRouterService

          org.switchyard.bus.camel.consumer ................: ServiceReference [name={urn:dk.miracle.dtgroup:MediusIntegration:1.0}ReplaceBodyContent/FileRouterService, interface=SWITCHYARD010007: BaseServiceInterface [type=java, operations=[SWITCHYARD010008: routeFile : IN_ONLY  : [java:java.lang.Object, null, null]]], domain=ServiceDomain [name=null]]

          org.switchyard.bus.camel.contract ................: org.switchyard.metadata.BaseExchangeContract@1897e50

          org.switchyard.bus.camel.dispatcher ..............: org.switchyard.bus.camel.ExchangeDispatcher@11b725e

          org.switchyard.bus.camel.intercept.Consumer ......: before

          org.switchyard.bus.camel.intercept.Provider ......: after

          org.switchyard.bus.camel.labels ..................: {org.switchyard.exchangeInitiatedNS=[org.switchyard.label.behavior.transient], org.switchyard.exchange.transaction.beforeInvoked=[org.switchyard.label.behavior.transient], org.switchyard.security.context.SecurityContext=[org.switchyard.label.behavior.transient]}

          org.switchyard.bus.camel.phase ...................: IN

          org.switchyard.bus.camel.provider ................: Service [name={urn:dk.miracle.dtgroup:MediusIntegration:1.0}FileRouterService, interface=SWITCHYARD010007: BaseServiceInterface [type=java, operations=[SWITCHYARD010008: routeFile : IN_ONLY  : [java:java.lang.Object, null, null]]], domain=ServiceDomain [name=null], metadata=org.switchyard.metadata.ServiceMetadataBuilder$ServiceMetadataImpl@aeb91a]

          org.switchyard.bus.camel.replyHandler ............: org.switchyard.component.camel.CamelResponseHandler@1c3d5c0

          org.switchyard.exchange.transaction.beforeInvoked : true

          org.switchyard.exchangeInitiatedNS ...............: 1411730481233511000

          org.switchyard.operationName .....................: transformBodyIfNeeded

          org.switchyard.security.context.SecurityContext ..: DefaultSecurityContext@14352457[systemUUID=9bc9973c-ed2a-46a6-9e99-acba3ac0b0fe, expirationMillis=0, credentials=[], securityDomainsToSubjects={}]

          org.switchyard.serviceName .......................: {urn:dk.miracle.dtgroup:MediusIntegration:1.0}TransformXMLBody

      Message Context ->

          breadcrumbId ..............................: ID-McDennis-local-56430-1411722950358-5-30

          breadcrumbid ..............................: ID-McDennis-local-56430-1411722950358-5-20

          camelfileabsolute .........................: true

          camelfileabsolutepath .....................: /temp/dtgroup/aspect4/out/Purchaseorders/Purchaseorder_IG00452171.XML

          camelfilelastmodified .....................: 1411730480000

          camelfilelength ...........................: 33723

          camelfilename .............................: Purchaseorders/Purchaseorder_IG00452171.XML

          camelfilenameonly .........................: Purchaseorder_IG00452171.XML

          camelfileparent ...........................: /temp/dtgroup/aspect4/out/Purchaseorders

          camelfilepath .............................: /temp/dtgroup/aspect4/out/Purchaseorders/Purchaseorder_IG00452171.XML

          camelfilerelativepath .....................: Purchaseorders/Purchaseorder_IG00452171.XML

          document.destination ......................: Medius

          document.destination.folder ...............: MasterData

          document.filename .........................: Purchaseorder_IG00452171.XML

          document.type .............................: PurchaseOrder

          org.switchyard.bus.camel.labels ...........: {org.switchyard.contentType=[org.switchyard.label.behavior.transient], org.switchyard.bus.camel.messageSent=[org.switchyard.label.behavior.transient], org.switchyard.transform.TransformSequence=[org.switchyard.label.behavior.transient]}

          org.switchyard.bus.camel.messageSent ......: true

          org.switchyard.contentType ................: java:java.lang.Object

          org.switchyard.messageId ..................: ID-McDennis-local-56430-1411722950358-5-30

          org.switchyard.messagecomposer ............: org.switchyard.component.camel.common.composer.CamelMessageComposer@149a78

          org.switchyard.messageid ..................: ID-McDennis-local-56430-1411722950358-5-26

          org.switchyard.transform.TransformSequence : org.switchyard.transform.TransformSequence@6374f

      Message Content ->

      ...

      ------ End Message Trace -------

       

      Regards

      Dennis