最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

rabbitmq - MassTransit 7.3.1 Publish method exception: "System.ObjectDisposedException: The CancellationTokenSource has

programmeradmin1浏览0评论

I am using mass transit 7.3.1 with mass transit simple injector for sending msgs to rabbit mq and upon using the method IPublishEndpoint.Publish (Task Publish<T>(object values, CancellationToken cancellationToken = default(CancellationToken)) where T : class; it throws the exception

Exception: "System.ObjectDisposedException: The CancellationTokenSource has been disposed.\n at MassTransit.Conte │ │ xt.BaseReceiveContext.get_CancellationToken()\n at MassTransit.Context.MessageConsumeContext1.GreenPipes.PipeContext.get_CancellationToken()\n at MassTransit.Context.ConsumeContextScope.get_Cancellati │ │ onToken()\n at MassTransit.Context.ConsumeContextScope.get_CancellationToken()\n at GreenPipes.ProxyPipeContext.get_CancellationToken()\n at GreenPipes.ProxyPipeContext.get_CancellationToken()\n at │ │ GreenPipes.ProxyPipeContext.get_CancellationToken()\n at MassTransit.Initializers.MessageInitializer2.Send(ISendEndpoint endpoint, InitializeContext`1 context, Object input)

I have tried passing the cancellation token within a using statement and also have tried passing CancellationToken.None. But neither has helped. Any ideas?

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论