Skip to content

Commit

Permalink
refactor: update AckQueueOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
WeihanLi committed Jan 4, 2025
1 parent ba14da8 commit e074b86
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/WeihanLi.Common/Event/AckQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ public sealed class AckQueueOptions
{
public TimeSpan AckTimeout { get; set; } = TimeSpan.FromMinutes(1);

public bool AutoRequeue { get; set; }
public bool AutoRequeue { get; set; } = true;

public TimeSpan Requeue { get; set; }
public TimeSpan Requeue { get; set; } = TimeSpan.FromMinutes(1);
}

public sealed class AckQueue : DisposableBase
Expand Down
5 changes: 4 additions & 1 deletion test/WeihanLi.Common.Test/EventsTest/AckQueueTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ namespace WeihanLi.Common.Test.EventsTest
{
public class AckQueueTest
{
private readonly AckQueue _ackQueue = new();
private readonly AckQueue _ackQueue = new(new()
{
AutoRequeue = false
});

[Fact]
public async Task EnqueueAsync_ShouldAddMessageToQueue()
Expand Down

0 comments on commit e074b86

Please sign in to comment.