You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Marco Zapletal (JIRA)" <ji...@apache.org> on 2013/07/23 15:32:47 UTC

[jira] [Commented] (CAMEL-6420) Custom context id for MDC logging

    [ https://issues.apache.org/jira/browse/CAMEL-6420?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13716383#comment-13716383 ] 

Marco Zapletal commented on CAMEL-6420:
---------------------------------------

Another possibility would be that users can provide their custom MDCUnitOfWork implementiation either via SPI or by configuring the camel context on startup. I have seen that the UnitOfWork interface is located in a package named spi - but as far as I have learned the Java SPI mechanism is not yet leveraged, or?
                
> Custom context id for MDC logging
> ---------------------------------
>
>                 Key: CAMEL-6420
>                 URL: https://issues.apache.org/jira/browse/CAMEL-6420
>             Project: Camel
>          Issue Type: Wish
>          Components: camel-core
>            Reporter: Marco Zapletal
>            Priority: Minor
>
> The Camel MDC feature is really great. However, we would like to use our own context id (i.e., a Camel header) instead of the ones available out of the box. So far as I have seen, there are no configuration options to do so. In addition, subclassing MDCUnitOfWork is also not the appropriate way to go...
> I have searched the mailing list and there have been similar requests in the past
> http://camel.465427.n5.nabble.com/custom-MDC-property-td4750999.html
> http://camel.465427.n5.nabble.com/custom-MDCUnitOfWork-td5730107.html
> In principle, I would see two ways to go to realize such a feature:
> - When configuring (activating) MDC logging on the context, there may be an additional option to define an expression, which is evaluated by the MDCUnitOfWork
> - The definition of a "quasi-standard" Camel header for user defined correlation - i.e., to define a reserved header key (similar to correlationId or messageId) that can be leveraged by Camel users to set their own correlation values - maybe such a header would also be usable for other use cases as well? Users can then configure MDC logging to use this header as context id. 
> I am happy to hear the thoughts of the Camel community

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira