Skip to content

Commit

Permalink
fix: prevent mqtt message already processed error
Browse files Browse the repository at this point in the history
  • Loading branch information
BEagle1984 committed Sep 26, 2023
1 parent 6700d65 commit 7eb02e5
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,7 @@ internal sealed class ConsumedApplicationMessage
public ConsumedApplicationMessage(MqttApplicationMessageReceivedEventArgs eventArgs)
{
EventArgs = eventArgs;
Id = eventArgs.ApplicationMessage.UserProperties
?.FirstOrDefault(header => header.Name == DefaultMessageHeaders.MessageId)?.Value
?? Guid.NewGuid().ToString();
Id = Guid.NewGuid().ToString();
}

public string Id { get; }
Expand Down

0 comments on commit 7eb02e5

Please sign in to comment.