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

Message lock duration is not working due to SessionIdleTimeout #696

Open
kimberlyyong opened this issue Feb 9, 2024 · 3 comments
Open

Comments

@kimberlyyong
Copy link

Description

When message is not completed, the message not supposed to be processed until the Lock Duration expire.
Message Lock Duration is set to 5 minutes
image
But non completed messages were retried every 10 seconds.
image

Actual Behavior

  1. Message is being processed as soon as SessionIdleTimeout kick in

Expected Behavior

  1. Even SessionIdleTimeout , message still should not be picked up until the original locked duration expires.

Here is my code, this is to work around this issue #454 (comment)
var runResult = await ProcessEvent(retryAndExecutor, eventName, messageData, message.ApplicationProperties);
if (runResult)
{
_logger.LogInformation($"Complete operation: {retryAndExecutor.Id} {args.Print()}");
await args.CompleteMessageAsync(message);
}
else
{
if (retryAndExecutor.HasChanged)
{
_logger.LogInformation($"Defer operation: {retryAndExecutor.Id} immediately, delivery count increased {args.Print()}");
await args.AbandonMessageAsync(message, retryAndExecutor.ApplicationProperties);
}
else
{
var timeInQueue = DateTimeOffset.UtcNow.Subtract(args.Message.EnqueuedTime).TotalMinutes;
if (timeInQueue > _maxMinutesToProcess)
{
_logger.LogInformation($"DLQ operation: {retryAndExecutor.Id} timeInQueue {timeInQueue} exceeds {_maxMinutesToProcess} minutes. {args.Print()}");
await args.DeadLetterMessageAsync(message, $"TimeInQueue exceeds limit {_maxMinutesToProcess}");
}
else
{
_logger.LogInformation($"Defer operation: {retryAndExecutor.Id} with message lock duration delay, delivery count stays the same {args.Print()}");
}
}
}

@EldertGrootenboer
Copy link
Contributor

Thank you for your feedback. We have opened an investigation task for this in our backlog, and will update this issue when we have more information.

@EldertGrootenboer
Copy link
Contributor

This item in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this item.

@anbeng
Copy link

anbeng commented May 3, 2024

Experiencing the same issue. Would like to use functionality if possible please.

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

No branches or pull requests

3 participants