rabbitmq / rabbitmq-dotnet-client

RabbitMQ .NET client for .NET Standard 2.0+ and .NET 4.6.2+
https://www.rabbitmq.com/dotnet.html
Other
2.07k stars 579 forks source link

5.2.0 -> 6.0.0-6.5.0 Performance Regression?! #1363

Closed ProIcons closed 1 year ago

ProIcons commented 1 year ago

Describe the bug

So I'm experimenting with a DLQ Analyzer tool, and i tried consuming messages from a DLQ with over 2.5million messages.

As the first step and PoC I wanted to setup a dummy consuming mechanism to see how it works.

This dummy consumer, consumed messages with a capped rate of 50/s.

This didn't make any sense because i was using another tool called QueueExplorer, and it was consuming from my computer to this rabbitmq with over 300 messages/s.

Downgrading the the version of the client this tool is using (5.2.0) seemed to increase the rate to approx 500/s

I might be missing something really obvious here, is there a configuration that might change this behavior? am i missing something?

I tried all versions and this occurs from 6.0.0 all the way up to 6.5.0. On 5.x this doesn't seem to be the case.

Reproduction steps

        using var connection = _connectionFactory.CreateConnection();
        var channel = connection.CreateModel();
        string uriString =
            $"{(config.SSL ? "amqps" : "amqp")}://{Uri.EscapeDataString(config.Username)}:{Uri.EscapeDataString(
                config.Password)}@{Uri.EscapeDataString(config.Host)}:{config.Port}";
        return new ConnectionFactory()
        {
            Uri = new Uri(uriString),
            AutomaticRecoveryEnabled = true,
            TopologyRecoveryEnabled = true
        };
        var consumer = new EventingBasicConsumer(channel);
        consumer.Received += (model, eventArgs) =>
        {
        };

        channel.BasicConsume(queueInfo.Name, false, "", false, true, null, consumer);

Expected behavior

Better consuming performance.

Additional context

No response