// ĠCopyright Ġ( c ) ĠCos mo ĠTech . Ċ // ĠLicensed Ġunder Ġthe ĠMIT Ġlicense . Ċ package Ġcom . cosm ote ch . api . events . in process Ċ Ċ import Ġcom . cosm ote ch . api . events . C sm Event Ċ import Ġcom . cosm ote ch . api . events . C sm Event Publisher Ċ import Ġorg . springframework . boot . autoconfigure . condition . Conditional On Property Ċ import Ġorg . springframework . context . Application Event Publisher Ċ import Ġorg . springframework . stereotype . Service Ċ Ċ @ Service Ċ @ Conditional On Property ( ĊĠĠĠ Ġname Ġ= Ġ[" cs m . platform . event - publisher . type "], Ġhaving Value Ġ= Ġ" in _ process ", Ġmatch If Missing Ġ= Ġtrue ) Ċ internal Ġclass ĠIn Process Event Publisher ( private Ġval Ġevent Publisher : ĠApplication Event Publisher ) Ġ: ĊĠĠĠ ĠC sm Event Publisher Ġ{ ĊĊĠ Ġoverride Ġfun Ġ< T Ġ: ĠC sm Event > Ġpublish Event ( event : ĠT ) Ġ{ ĊĠĠĠ Ġthis . event Publisher . publish Event ( event ) ĊĠ Ġ} Ċ } Ċ