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

💪 [New]: enhance the ServiceBusMessageFilter timeouts #322

Open
stijnmoreels opened this issue Mar 5, 2025 · 0 comments
Open

💪 [New]: enhance the ServiceBusMessageFilter timeouts #322

stijnmoreels opened this issue Mar 5, 2025 · 0 comments
Labels
area:service-bus All issues related to Azure Service bus testing enhancement New feature or request feature-request All issues related to feature requests by customers good first issue Good for newcomers
Milestone

Comments

@stijnmoreels
Copy link
Member

stijnmoreels commented Mar 5, 2025

Description

The current ServiceBusMessageFilter provides a simple way of receiving Azure Service bus messages on queues and topic subscriptions, but right now only via the CancellationToken, can there be a way of providing a 'timeout' to stop receiving messages.

Solution

Provide an overload for AnyAsync and ToListAsync that takes in a TimeSpan to have a more test-friendly way of retrieving messages.

using var ct = new CancellaionTokenSource();
ct.CancelAfter(timeout);

try
{
    // Actual AnyAsync/ToListAsync call.
}
catch (TaskCancelledException)
{
}

Additional context

Follow-up of #201

@stijnmoreels stijnmoreels added the feature-request All issues related to feature requests by customers label Mar 5, 2025
@github-project-automation github-project-automation bot moved this to To do in Roadmap Mar 5, 2025
@stijnmoreels stijnmoreels added this to the v2.0 milestone Mar 5, 2025
@stijnmoreels stijnmoreels added enhancement New feature or request good first issue Good for newcomers area:service-bus All issues related to Azure Service bus testing labels Mar 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:service-bus All issues related to Azure Service bus testing enhancement New feature or request feature-request All issues related to feature requests by customers good first issue Good for newcomers
Projects
Status: To do
Development

No branches or pull requests

1 participant