1
0
mirror of synced 2024-11-05 11:09:17 +00:00
Tapeti/Tapeti.Annotations/DynamicQueueAttribute.cs

27 lines
857 B
C#
Raw Normal View History

using System;
namespace Tapeti.Annotations
{
/// <summary>
/// Creates a non-durable auto-delete queue to receive messages. Can be used
/// on an entire MessageController class or on individual methods.
/// </summary>
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class DynamicQueueAttribute : Attribute
{
2018-08-31 17:17:56 +00:00
public string Prefix { get; set; }
/// <summary>
/// If prefix is specified, Tapeti will compose the queue name using the
/// prefix and a unique ID. If not specified, an empty queue name will be passed
/// to RabbitMQ thus letting it create a unique queue name.
/// </summary>
/// <param name="prefix"></param>
public DynamicQueueAttribute(string prefix = null)
{
Prefix = prefix;
}
}
}