forked from zarusz/SlimMessageBus
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
zarusz#311 IOutboxRepository<T> with key type
Signed-off-by: krivchenko_kv <[email protected]>
- Loading branch information
krivchenko_kv
committed
Sep 27, 2024
1 parent
698a9a2
commit 6f2c4f8
Showing
20 changed files
with
154 additions
and
111 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
src/SlimMessageBus.Host.Outbox.DbContext/GlobalSuppressions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file is used by Code Analysis to maintain SuppressMessage | ||
// attributes that are applied to this project. | ||
// Project-level suppressions either have no target or are given | ||
// a specific target and scoped to a namespace, type, member, etc. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
[assembly: SuppressMessage("Minor Code Smell", "S6672:Generic logger injection should match enclosing type", Justification = "<Pending>", Scope = "member", Target = "~M:SlimMessageBus.Host.Outbox.DbContext.DbContextOutboxRepository`1.#ctor(Microsoft.Extensions.Logging.ILogger{SlimMessageBus.Host.Outbox.Sql.SqlOutboxRepository},SlimMessageBus.Host.Outbox.Sql.SqlOutboxSettings,SlimMessageBus.Host.Outbox.Sql.SqlOutboxTemplate,`0,SlimMessageBus.Host.Sql.Common.ISqlTransactionService)")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
namespace SlimMessageBus.Host.Outbox.Sql; | ||
|
||
public interface ISqlOutboxRepository : IOutboxRepository | ||
public interface ISqlOutboxRepository : IOutboxRepository<Guid> | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// This file is used by Code Analysis to maintain SuppressMessage | ||
// attributes that are applied to this project. | ||
// Project-level suppressions either have no target or are given | ||
// a specific target and scoped to a namespace, type, member, etc. | ||
|
||
using System.Diagnostics.CodeAnalysis; | ||
|
||
[assembly: SuppressMessage("Minor Code Smell", "S2094:Classes should not be empty", Justification = "<Pending>")] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 7 additions & 6 deletions
13
src/SlimMessageBus.Host.Outbox/Repositories/IOutboxRepository.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
namespace SlimMessageBus.Host.Outbox; | ||
|
||
public interface IOutboxRepository | ||
public interface IOutboxRepository<TOutboxKey> | ||
{ | ||
Task Save(OutboxMessage message, CancellationToken token); | ||
Task<IReadOnlyCollection<OutboxMessage>> LockAndSelect(string instanceId, int batchSize, bool tableLock, TimeSpan lockDuration, CancellationToken token); | ||
Task AbortDelivery (IReadOnlyCollection<Guid> ids, CancellationToken token); | ||
Task UpdateToSent(IReadOnlyCollection<Guid> ids, CancellationToken token); | ||
Task IncrementDeliveryAttempt(IReadOnlyCollection<Guid> ids, int maxDeliveryAttempts, CancellationToken token); | ||
Task<TOutboxKey> GenerateId(CancellationToken cancellationToken); | ||
Task Save(OutboxMessage<TOutboxKey> message, CancellationToken token); | ||
Task<IReadOnlyCollection<OutboxMessage<TOutboxKey>>> LockAndSelect(string instanceId, int batchSize, bool tableLock, TimeSpan lockDuration, CancellationToken token); | ||
Task AbortDelivery(IReadOnlyCollection<TOutboxKey> ids, CancellationToken token); | ||
Task UpdateToSent(IReadOnlyCollection<TOutboxKey> ids, CancellationToken token); | ||
Task IncrementDeliveryAttempt(IReadOnlyCollection<TOutboxKey> ids, int maxDeliveryAttempts, CancellationToken token); | ||
Task DeleteSent(DateTime olderThan, CancellationToken token); | ||
Task<bool> RenewLock(string instanceId, TimeSpan lockDuration, CancellationToken token); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
src/SlimMessageBus.Host.Outbox/Services/OutboxLockRenewalTimer.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 4 additions & 8 deletions
12
src/SlimMessageBus.Host.Outbox/Services/OutboxLockRenewalTimerFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.