2016-12-05 07:00:09 +00:00
|
|
|
|
using System;
|
2019-05-20 13:24:12 +00:00
|
|
|
|
using JetBrains.Annotations;
|
2016-12-05 07:00:09 +00:00
|
|
|
|
|
|
|
|
|
namespace Tapeti.Annotations
|
|
|
|
|
{
|
2019-03-19 10:47:52 +00:00
|
|
|
|
/// <inheritdoc />
|
2016-12-05 07:00:09 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Binds to an existing durable queue to receive messages. Can be used
|
|
|
|
|
/// on an entire MessageController class or on individual methods.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <remarks>
|
|
|
|
|
/// At the moment there is no support for creating a durable queue and managing the
|
|
|
|
|
/// bindings. The author recommends https://git.x2software.net/pub/RabbitMetaQueue
|
|
|
|
|
/// for deploy-time management of durable queues (shameless plug intended).
|
|
|
|
|
/// </remarks>
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
|
2019-05-20 13:24:12 +00:00
|
|
|
|
[MeansImplicitUse]
|
2017-02-12 18:15:56 +00:00
|
|
|
|
public class DurableQueueAttribute : Attribute
|
2016-12-05 07:00:09 +00:00
|
|
|
|
{
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
|
|
|
|
|
|
2019-03-19 10:47:52 +00:00
|
|
|
|
/// <inheritdoc />
|
|
|
|
|
/// <param name="name">The name of the durable queue</param>
|
2017-02-12 18:15:56 +00:00
|
|
|
|
public DurableQueueAttribute(string name)
|
2016-12-05 07:00:09 +00:00
|
|
|
|
{
|
|
|
|
|
Name = name;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|