package Ġlibrary . service . correlation Ċ Ċ import Ġlibrary . service . logging . logger Ċ import Ġorg . springframework . amqp . core . Message Ċ import Ġorg . springframework . amqp . core . Message Post Processor Ċ import Ġorg . springframework . stereotype . Component Ċ Ċ @ Component Ċ class ĠCorre lation Id Message Post Processor ( ĊĠĠĠĠĠĠĠ Ġprivate Ġval Ġcorr le ation Id Holder : ĠCorre lation Id Holder Ċ ) Ġ: ĠMessage Post Processor Ġ{ ĊĊĠĠĠ Ġprivate Ġval Ġlog Ġ= ĠCorre lation Id Message Post Processor :: class . logger ĊĊĠĠĠ Ġoverride Ġfun Ġpost Process Message ( message : ĠMessage ) Ġ= Ġmessage . apply Ġ{ ĊĠĠĠĠĠĠĠ Ġval Ġcorrelation Id Ġ= Ġcorr le ation Id Holder . get () Ġ?: ĠCorre lation Id . generate () ĊĠĠĠĠĠĠĠ Ġlog . debug (" setting Ġmessage Ġcorrelation ĠID Ġto Ġ[ {} ]", Ġcorrelation Id ) ĊĠĠĠĠĠĠĠ Ġmessage Properties . correlation Id Ġ= Ġcorrelation Id ĊĠĠĠ Ġ} Ċ Ċ }