Service1.Method1 Creates a Background Thread.
Background Thread uses HostContext.Resolve to publish a message to Service1.Method2 which has DTO that is registered under the background MQ service.
Service1.Method2 gets Cannot used a disposed object when using Gateway.Publish/Send to Service2.Method1. It also occasionally gets a null from HostContext.Resolve if I try that.
I have fought this problem at least a dozen times and it seems very non-deterministic. Why would Gateway be disposed in a service call if the service happens to be called by resolving from the host?? Why would hostcontext.resolve ever return a null for ImessageService?