c0e83bdb77
Add backward-compatible context-aware handling and permanent validation hooks. Ref: IT-1033
24 lines
901 B
C#
24 lines
901 B
C#
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?>();
|
|
}
|