using Connected.Data; namespace Connected.Collections.Queues; /// /// Represents a single queue message. /// /// /// A queue message represents a unit of queued or deferred work which /// can be processed distributed anywhere or in any client which /// has access to the Queue REST service. /// public interface IQueueMessage : IPrimaryKey, IPopReceipt { /// /// Date date and time the queue message was created. /// DateTime Created { get; init; } /// /// The number of times the clients dequeued the message. /// /// /// There are numerous reasons why queue message gets dequeued multiple /// times. It could be that not all conditions were met at the time /// of processing or that queue message was not processed quich enough and /// its pop receipt expired. In such cases message returns to the queue and /// waits for the next client to dequeue it. /// int DequeueCount { get; init; } /// /// The timestamp message was last dequeued. /// DateTime? DequeueTimestamp { get; init; } /// /// The queue to which the message belongs. /// /// /// Every queue client must specify which queue processes. /// string Queue { get; init; } /// /// The arguments object which contains information about the message. /// /// /// Most queue messages do have an argument object, mostly providing na id of the /// entity or record for which processing should be performed. /// QueueArgs Arguments { get; init; } }