WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 843e6d1

Browse files
committed
Add MessageId to RabbitMQ message properties. (#1740)
This commit introduces a new line of code that sets the `MessageId` property of the `BasicProperties` object using the `GetId()` method from the `message` object. This enhancement ensures that each message published to RabbitMQ includes a unique identifier, improving traceability and message management.
1 parent 98f9328 commit 843e6d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/DotNetCore.CAP.RabbitMQ/ITransport.RabbitMQ.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public async Task<OperateResult> SendAsync(TransportMessage message)
3636

3737
var props = new BasicProperties
3838
{
39+
MessageId = message.GetId(),
3940
DeliveryMode = DeliveryModes.Persistent,
4041
Headers = message.Headers.ToDictionary(x => x.Key, object? (x) => x.Value)
4142
};

0 commit comments

Comments
 (0)