public void DoStuffAndPublishMessage(int count) { for (var i = 0; i < count; ++i) { var myPublishDto = new MyPublishDto(); _messageBus.Publish(MyTestServiceConfig.MyTestPublish, myPublishDto); } }
public void MyTestSubscribeHandler(MySubscribeDto mySubscribeDto, CancellationToken cancellationToken) { if (mySubscribeDto.Name == "Exception") { throw new Exception(mySubscribeDto.Name); } var myPublishDto = new MyPublishDto(); _messageBus.Publish(MyTestServiceConfig.MyTestPublish, myPublishDto); }