Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/MassTransit.PostgresOutbox/Abstractions/InboxConsumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,13 @@ public async Task Consume(ConsumeContext<TMessage> context)
logger.LogError(ex, "Exception thrown while consuming message {messageId} by {consumerId}",
messageId,
_consumerId);

await transactionScope.RollbackAsync();

inboxMessage.UpdatedAt = DateTime.UtcNow;
await dbContext.SaveChangesAsync();
await dbContext.InboxMessages
.Where(x => x.MessageId == messageId && x.ConsumerId == _consumerId)
.ExecuteUpdateAsync(x => x.SetProperty(x => x.UpdatedAt, x => DateTime.UtcNow));

throw;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<PackageReadmeFile>Readme.md</PackageReadmeFile>
<Authors>Pandatech</Authors>
<Copyright>MIT</Copyright>
<Version>3.0.2</Version>
<Version>3.0.3</Version>
<PackageId>Pandatech.MassTransit.PostgresOutbox</PackageId>
<Title>Pandatech MassTransit PostgreSQL Outbox Extension</Title>
<PackageTags>Pandatech, library, postgres, distributed systems, microservices, modular monolith, messaging, efcore, mass transit, outbox pattern, inbox pattern</PackageTags>
Expand Down