using System;

namespace ZB.MOM.WW.MxGateway.Worker.MxAccess;

public sealed class MxAccessEventQueueOverflowException : Exception
{
    /// <summary>
    /// Initializes a new instance of <see cref="MxAccessEventQueueOverflowException"/>.
    /// </summary>
    /// <param name="capacity">Queue capacity.</param>
    public MxAccessEventQueueOverflowException(int capacity)
        : base($"MXAccess outbound event queue reached its configured capacity of {capacity}.")
    {
        Capacity = capacity;
    }

    /// <summary>
    /// Gets the queue capacity.
    /// </summary>
    public int Capacity { get; }
}
