Interface IExpirableMessage
- Namespace
- DotCompute.Abstractions.Messaging
- Assembly
- DotCompute.Abstractions.dll
Represents a message that supports Time-To-Live (TTL) expiration.
public interface IExpirableMessage : IRingKernelMessage
- Inherited Members
Remarks
Messages implementing this interface can specify their own expiration time, overriding any queue-level timeout settings.
Properties
CreatedAt
Gets or sets the time when this message was created.
DateTimeOffset CreatedAt { get; set; }
Property Value
Remarks
Used in conjunction with TimeToLive to determine when the message expires. Default: UtcNow
ExpiresAt
Gets the absolute expiration time of this message.
DateTimeOffset? ExpiresAt { get; }
Property Value
IsExpired
Gets a value indicating whether the message has expired.
bool IsExpired { get; }
Property Value
TimeToLive
Gets or sets the message's time-to-live duration.
TimeSpan TimeToLive { get; set; }
Property Value
Remarks
The message expires when CreatedAt + TimeToLive is less than the current time.
Set to InfiniteTimeSpan for no expiration. Default: 30 seconds