feat: expose RabbitMQ delivery context
Add backward-compatible context-aware handling and permanent validation hooks. Ref: IT-1033
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
namespace Hrynco.RabbitMq;
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
/// <summary>
|
||||
/// Transport metadata supplied by RabbitMQ for a delivered message.
|
||||
/// Application-specific consumers can use this context for validation,
|
||||
/// correlation, and diagnostics without taking ownership of acknowledgements.
|
||||
/// </summary>
|
||||
public sealed record RabbitMqMessageContext
|
||||
{
|
||||
public required string QueueName { get; init; }
|
||||
public required string Exchange { get; init; }
|
||||
public required string RoutingKey { get; init; }
|
||||
public string? MessageId { get; init; }
|
||||
public string? MessageType { get; init; }
|
||||
public string? CorrelationId { get; init; }
|
||||
public string? ReplyTo { get; init; }
|
||||
public string? ContentType { get; init; }
|
||||
public bool Redelivered { get; init; }
|
||||
public IReadOnlyDictionary<string, object?> Headers { get; init; }
|
||||
= new Dictionary<string, object?>();
|
||||
}
|
||||
Reference in New Issue
Block a user