MdcPropagatingDispatcherConfigurator

uk.gov.hmrc.play.bootstrap.dispatchers.MdcPropagatingDispatcherConfigurator
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 pekko)

This can be enabled with.

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

Attributes

Graph
Supertypes
class MessageDispatcherConfigurator
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def dispatcher(): MessageDispatcher

Returns an instance of MessageDispatcher given the configuration. Depending on the needs the implementation may return a new instance for each invocation or return the same instance every time.

Returns an instance of MessageDispatcher given the configuration. Depending on the needs the implementation may return a new instance for each invocation or return the same instance every time.

Attributes

Definition Classes
MessageDispatcherConfigurator

Inherited methods

def configureExecutor(): ExecutorServiceConfigurator

Attributes

Inherited from:
MessageDispatcherConfigurator