2019-04-24 18:04:30 +02:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2019-08-15 16:00:04 +02: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>
|
|
|
|
|
/// Provides a publisher which can send request messages, and await the response on a dynamic queue.
|
|
|
|
|
/// </summary>
|
2019-04-24 18:04:30 +02:00
|
|
|
|
public interface ITransientPublisher
|
|
|
|
|
{
|
2019-08-13 20:30:04 +02:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Sends a request and waits for the response with the timeout specified in the WithTransient config call.
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="request"></param>
|
|
|
|
|
/// <typeparam name="TRequest"></typeparam>
|
|
|
|
|
/// <typeparam name="TResponse"></typeparam>
|
2022-11-23 09:13:38 +01:00
|
|
|
|
Task<TResponse> RequestResponse<TRequest, TResponse>(TRequest request) where TRequest : class where TResponse : class;
|
2019-04-24 18:04:30 +02:00
|
|
|
|
}
|
|
|
|
|
}
|