Alexander Clayton
Alexander Clayton

Reputation: 69

Mass Transit skips commands under light load

I have recently built a simple Mass Transit service that processes commands. If I send 3 commands at once it correctly consumes the first 2 then the third is put on the *_skipped queue. My understanding is that command should only be put on the skipped queue if there is no consumer at the endpoint that can handle it so I am confused why the third command should be skipped. What can I do to investigate this further and resolve the issue?

This is the configuration for the consumer

    services.AddMassTransit(x =>
        {
            x.AddBus(provider => Bus.Factory.CreateUsingRabbitMq(cfg =>
            {
                var host = cfg.Host(_settings.RabbitMqConnectionString, "/", h => { });

                cfg.UseInMemoryScheduler();
                //cfg.UseMessageScheduler(new Uri("rabbitmq://localhost/quartz"));
                cfg.UseExtensionsLogging(provider.GetRequiredService<ILoggerFactory>());

                cfg.ReceiveEndpoint(host, CurriculumQueryHelper.EndpointName, e =>
                {
                    e.Consumer<CurriculumQueryHelper>(provider);
                });

                cfg.ReceiveEndpoint(host, CurriculumCommandHelper.EndpointName, e =>
                {
                    e.Consumer<CurriculumCommandHelper>(provider, config =>
                    {
                        //config.UseConcurrencyLimit(1);
                    });
                });
            }));
        });

Upvotes: 1

Views: 132

Answers (1)

Alexander Clayton
Alexander Clayton

Reputation: 69

It turns out that another service had registered an endpoint with the same address that I was sending the commands to and this was causing the commands to be skipped.

Upvotes: 1

Related Questions