how can i share context data between masstransit consumers while using ibuscontrol for publishing messages?

As explained in the documentation, consumers (and their dependencies) must use one of the following when sending/publishing messages:

  • ConsumeContext, typically within the consumer itself
  • IPublishEndpoint or ISendEndpointProvider, typically used by scoped dependencies of the consumer
  • IBus, last resort, as all contextual data is lost from the inbound message

As for your final question, “Is there a way to share the Context data between Consumers while using IBusControl for sending / publishing messages?” the answer is no. The consume context would be needed to access any of the contextual data.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top