We have been using MassTransit in production for a few years, versions 2 & 3, and we have had great success with it.
We have recently stood up a few .net core 2 services and have tried MassTransit 4.0.0, as well as a few of the v4.*-develop versions that are out there. when messages are processed without error we haven't experienced any issues.
However, when we have run across an error while processing a message we have seen unexpected results. Retry logic seems to be functional, however, channels seem to spawn out of control.
Here is a simple unit test as an example:
var waitHandle = new AutoResetEvent(false);
var messageCReceived = false;
MessageCConsumer.MessageCReceived += (sender, args) =>
{
messageCReceived = true;
waitHandle.Set();
throw (new Exception("test error"));
};
MassTransitBus.CreateBus(GetConfigTestValue(), (sbc, host) =>
{
sbc.ReceiveEndpoint(host, "SpamErrorTest_Receive_SubscriptionC", ep =>
{
ep.Consumer<MessageCConsumer>();
});
});
for (int i = 0; i < 100; i++)
{
await MassTransitBus.Publish(new MessageC { Name = "GreatMessage" });
}
var didNotTimeout = waitHandle.WaitOne(5);
With that example of sending 100 messages, if we comment out the throw line, we complete the code with 1 publish channel. however, when we throw the exception during processing. we've seen the channel count for the single connection increase from 1 publish channel to somewhere between 27 and 51 publish channels associated to the single connection.
I saw it referred to as Channel Storm in a few older posts from older versions of the package. Could this have been re-introduced in this version of the library?
Thanks for your time