Skip to content

Commit

Permalink
ServiceBus: Add property FirstAquirer to IncomingMessage
Browse files Browse the repository at this point in the history
  • Loading branch information
kennethmyhra committed Sep 20, 2022
1 parent 4f771ce commit 1d8f556
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Helsenorge.Messaging/Abstractions/IncomingMessage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,10 @@ public class IncomingMessage
/// </summary>
public Func<Task> DeadletterAsync { get; internal set; }
/// <summary>
/// Returns true if this is the first time the message is aquried.
/// </summary>
public bool FirstAquirer { get; internal set; }
/// <summary>
/// Gets the number of deliveries.
/// </summary>
public int DeliveryCount { get ; internal set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,8 @@ private async Task<IncomingMessage> HandleRawMessage(IMessagingMessage message,
ReleaseAsync = message.RelaseAsync,
Deadletter = message.DeadLetter,
DeadletterAsync = message.DeadLetterAsync,
// FIXME: This will be moved to the interface IMessagingMessage in version 5.0
FirstAquirer = (message as ServiceBusMessage)?.FirstAcquirer ?? false,
DeliveryCount = message.DeliveryCount,
LockedUntil = message.LockedUntil,
};
Expand Down

0 comments on commit 1d8f556

Please sign in to comment.