You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Connected.Framework/Connected.Collections/Queues/IQueueMessage.cs

49 lines
1.6 KiB

using Connected.Data;
namespace Connected.Collections.Queues;
/// <summary>
/// Represents a single queue message.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
public interface IQueueMessage : IPrimaryKey<long>, IPopReceipt
{
/// <summary>
/// Date date and time the queue message was created.
/// </summary>
DateTime Created { get; init; }
/// <summary>
/// The number of times the clients dequeued the message.
/// </summary>
/// <remarks>
/// 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.
/// </remarks>
int DequeueCount { get; init; }
/// <summary>
/// The timestamp message was last dequeued.
/// </summary>
DateTime? DequeueTimestamp { get; init; }
/// <summary>
/// The queue to which the message belongs.
/// </summary>
/// <remarks>
/// Every queue client must specify which queue processes.
/// </remarks>
string Queue { get; init; }
/// <summary>
/// The arguments object which contains information about the message.
/// </summary>
/// <remarks>
/// Most queue messages do have an argument object, mostly providing na id of the
/// entity or record for which processing should be performed.
/// </remarks>
QueueArgs Arguments { get; init; }
}