Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users expect transport and errors settings to be configured while these are being ignored #210

Open
ramonsmits opened this issue Oct 13, 2022 · 2 comments

Comments

@ramonsmits
Copy link
Member

ramonsmits commented Oct 13, 2022

Some users try do to things like:

.UseNServiceBus(configuration =>
{
    var endpointConfiguration = configuration.AdvancedConfiguration;
    endpointConfiguration.License(NServiceBusLicense);
    endpointConfiguration.EnableInstallers();
    endpointConfiguration.SendFailedMessagesTo(errorQueueName);

    var transport = endpointConfiguration.UseTransport<AzureServiceBusTransport>();
    transport.ConnectionString(serviceBusNameSpaceFQDN);
    transport.CustomTokenCredential(new DefaultAzureCredential());

    var recoverability = endpointConfiguration.Recoverability();
    recoverability.Immediate(customizations: immediate => { mmediate.NumberOfRetries(3); });
    recoverability.Delayed(customizations: delayed => { delayed.NumberOfRetries(5).TimeIncrease(TimeSpan.FromSeconds(30)); });

    endpointConfiguration.LimitMessageProcessingConcurrencyTo(numberOfConsumers);

    // Disable the error queue to let NserviceBus native dead-lettering handle repeated failures:

    configuration.DoNotSendMessagesToErrorQueue();

    //@TODO: Add throttling behavior

})

The transport and concurrency limit settings are ignored but users are unaware of this. Same with DoNotSendMessagesToErrorQueue which overrides SendFailedMessagesTo. These conflicting settings should result in an endpoint not being able to start or even better. Such APIs should not even be available when using Azure Functions.

@SeanFeldman
Copy link

SeanFeldman commented Oct 13, 2022

That'd be nice.

Regarding sending messages to the error queue, could be possible with middleware.

@mikeminutillo
Copy link
Member

mikeminutillo commented Sep 20, 2023

In the following PR we are detecting when someone uses APIs to configure the transport in ways that do not function correctly in a serverless context:

The documentation for DoNotSendMessagesToErrorQueue states

Disables moving messages to the error queue even if an error queue name is configured.

That seems to imply that you are supposed to be allowed to configure both by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants