Mark van Renswoude
f8fca5879c
- Compiles, but that's about it. Plenty of ToDo's left before it will run. Beware, ye who enter here. - Cleanup of the internals, with the aim to keep the interface to application code compatible - Added the ability to declare durable queues on startup and update the bindings - Possibly fixed an issue with publish timeouts being logged after a reconnect
30 lines
771 B
C#
30 lines
771 B
C#
using System.Threading.Tasks;
|
|
|
|
namespace Tapeti.Transient
|
|
{
|
|
/// <inheritdoc />
|
|
/// <summary>
|
|
/// Default implementation of ITransientPublisher
|
|
/// </summary>
|
|
public class TransientPublisher : ITransientPublisher
|
|
{
|
|
private readonly TransientRouter router;
|
|
private readonly IPublisher publisher;
|
|
|
|
|
|
/// <inheritdoc />
|
|
public TransientPublisher(TransientRouter router, IPublisher publisher)
|
|
{
|
|
this.router = router;
|
|
this.publisher = publisher;
|
|
}
|
|
|
|
|
|
/// <inheritdoc />
|
|
public async Task<TResponse> RequestResponse<TRequest, TResponse>(TRequest request)
|
|
{
|
|
return (TResponse)(await router.RequestResponse(publisher, request));
|
|
}
|
|
}
|
|
}
|