2019-04-24 16:04:30 +00:00
|
|
|
|
using System;
|
2019-08-13 18:30:04 +00:00
|
|
|
|
using Tapeti.Config;
|
2019-04-24 16:04:30 +00:00
|
|
|
|
|
|
|
|
|
namespace Tapeti.Transient
|
|
|
|
|
{
|
2019-08-13 18:30:04 +00:00
|
|
|
|
/// <summary>
|
2019-08-14 10:20:53 +00:00
|
|
|
|
/// ITapetiConfigBuilder extension to register Tapeti.Transient
|
2019-08-13 18:30:04 +00:00
|
|
|
|
/// </summary>
|
2019-04-24 16:04:30 +00:00
|
|
|
|
public static class ConfigExtensions
|
|
|
|
|
{
|
2019-08-13 18:30:04 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Registers the transient publisher and required middleware
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="config"></param>
|
|
|
|
|
/// <param name="defaultTimeout"></param>
|
|
|
|
|
/// <param name="dynamicQueuePrefix"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public static ITapetiConfigBuilder WithTransient(this ITapetiConfigBuilder config, TimeSpan defaultTimeout, string dynamicQueuePrefix = "transient")
|
2019-04-24 16:04:30 +00:00
|
|
|
|
{
|
2019-08-13 18:30:04 +00:00
|
|
|
|
config.Use(new TransientExtension(defaultTimeout, dynamicQueuePrefix));
|
2019-04-24 16:04:30 +00:00
|
|
|
|
return config;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|