uk.gov.hmrc.play.bootstrap.dispatchers

Members list

Type members

Classlikes

class MDCPropagatingExecutorService(delegate: ExecutorService) extends ExecutorServiceDelegate, MdcExecutorService

Attributes

Supertypes
trait MdcExecutorService
trait ExecutorServiceDelegate
trait ExecutorService
trait AutoCloseable
trait Executor
class Object
trait Matchable
class Any
Show all
class MDCPropagatingExecutorServiceConfigurator(config: Config, prerequisites: DispatcherPrerequisites) extends ExecutorServiceConfigurator

Attributes

Supertypes
class ExecutorServiceConfigurator
trait ExecutorServiceFactoryProvider
class Object
trait Matchable
class Any
class MdcPropagatingDispatcherConfigurator(config: Config, prerequisites: DispatcherPrerequisites) extends MessageDispatcherConfigurator

This provides an ExecutionContext which copies MDC data over in prepare(). Since prepare() is implicitly called by Promise#onComplete, MDC data will not be lost on many async boundaries. It may still be required to explicitly call prepare() in some scenarios (e.g. with akka)

This provides an ExecutionContext which copies MDC data over in prepare(). Since prepare() is implicitly called by Promise#onComplete, MDC data will not be lost on many async boundaries. It may still be required to explicitly call prepare() in some scenarios (e.g. with akka)

This can be enabled with.

 akka.actor.default-dispatcher {
   type = "uk.gov.hmrc.play.bootstrap.dispatchers.MdcPropagatingDispatcherConfigurator"
 }

It is not enabled by default yet, since there are a few situations in play-framework where prepare is not being called, where MDCPropagatingExecutorServiceConfigurator works better - although MDC will need to be explicitly preserved with Promises.

Attributes

Supertypes
class MessageDispatcherConfigurator
class Object
trait Matchable
class Any
trait MdcPropagatorExecutionContext extends ExecutionContext

propagates the logback MDC in future callbacks

propagates the logback MDC in future callbacks

Attributes

Supertypes
trait ExecutionContext
class Object
trait Matchable
class Any
Self type