2019-04-24 18:04:30 +02:00
|
|
|
|
using System;
|
2019-08-13 20:30:04 +02:00
|
|
|
|
using Tapeti.Config;
|
2019-04-24 18:04:30 +02:00
|
|
|
|
|
2022-11-22 13:20:47 +01:00
|
|
|
|
// ReSharper disable UnusedMember.Global
|
|
|
|
|
|
2019-04-24 18:04:30 +02:00
|
|
|
|
namespace Tapeti.Transient
|
|
|
|
|
{
|
2019-08-13 20:30:04 +02:00
|
|
|
|
/// <summary>
|
2019-08-14 12:20:53 +02:00
|
|
|
|
/// ITapetiConfigBuilder extension to register Tapeti.Transient
|
2019-08-13 20:30:04 +02:00
|
|
|
|
/// </summary>
|
2019-04-24 18:04:30 +02:00
|
|
|
|
public static class ConfigExtensions
|
|
|
|
|
{
|
2019-08-13 20:30:04 +02: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 18:04:30 +02:00
|
|
|
|
{
|
2019-08-13 20:30:04 +02:00
|
|
|
|
config.Use(new TransientExtension(defaultTimeout, dynamicQueuePrefix));
|
2019-04-24 18:04:30 +02:00
|
|
|
|
return config;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|