try to refactor Kafka and add supports for RabbitMQ ...

This commit is contained in:
2026-08-18 17:53:35 +03:30
parent 3e0bb2c25f
commit b20c2f8db7
9 changed files with 861 additions and 5 deletions
+48
View File
@@ -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
);
}
}