2019-04-24 16:04:30 +00:00
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
2019-08-15 14:00:04 +00:00
|
|
|
|
// ReSharper disable UnusedMember.Global
|
|
|
|
|
|
2019-04-24 16:04:30 +00:00
|
|
|
|
namespace Tapeti.Transient
|
|
|
|
|
{
|
2019-08-13 18:30:04 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Provides a publisher which can send request messages, and await the response on a dynamic queue.
|
|
|
|
|
/// </summary>
|
2019-04-24 16:04:30 +00:00
|
|
|
|
public interface ITransientPublisher
|
|
|
|
|
{
|
2019-08-13 18:30:04 +00: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>
|
2019-04-24 16:04:30 +00:00
|
|
|
|
Task<TResponse> RequestResponse<TRequest, TResponse>(TRequest request);
|
|
|
|
|
}
|
|
|
|
|
}
|