try to refactor Kafka and add supports for RabbitMQ ...
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using xEventService.Models;
|
||||
|
||||
namespace xEventService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// RabbitMQ Producer Service Implementation ...
|
||||
/// </summary>
|
||||
public interface IXRabbitMQProducerService : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Sending Message with Full Request Descriptor ...
|
||||
/// </summary>
|
||||
/// <param name="request">
|
||||
/// an Instance of <see cref="XEventRequest"/>.
|
||||
/// Topic is used as Exchange Name ...
|
||||
/// </param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> SendMessageAsync(
|
||||
XEventRequest request,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Sending a Message to Default Exchange ...
|
||||
/// </summary>
|
||||
/// <param name="message">
|
||||
/// an Instance of <see cref="XEventMessage"/> ...
|
||||
/// </param>
|
||||
/// <param name="exchange">
|
||||
/// Target Exchange Name. if empty, uses default from configuration ...
|
||||
/// </param>
|
||||
/// <param name="routingKey">
|
||||
/// Routing Key for message routing ...
|
||||
/// </param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> SendMessageAsync(
|
||||
XEventMessage message,
|
||||
string exchange = null,
|
||||
string routingKey = null,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user