add supports for ZeroMQ, XRabbitMQ, XKafka ...

This commit is contained in:
2026-08-19 14:52:56 +03:30
parent 1e0641643d
commit e05420b1aa
11 changed files with 532 additions and 66 deletions
+25 -7
View File
@@ -6,6 +6,8 @@ using Microsoft.Extensions.Logging;
using xCommons.Extensions;
using xEventService.Configuration;
using xEventService.Constants;
using xEventService.Extensions;
using xEventService.Models;
using xExceptions.Constants;
namespace xEventService.Providers
@@ -87,10 +89,21 @@ namespace xEventService.Providers
)
{
//
await DoWorkAsync(
payload: consumeResult.Message,
cancellationToken: cancellationToken
);
var message = consumeResult
.Message
.Value
.FromJSON<XEventMessage>();
if (message.IsValid(
allowedSenders: allowedSenders,
allowedActions: allowedActions)
)
{
//
await DoWorkAsync(
payload: consumeResult.Message,
cancellationToken: cancellationToken
);
}
}
}
catch (ConsumeException)
@@ -105,13 +118,18 @@ namespace xEventService.Providers
}
/// <summary>
/// Dispose Implementation ...
/// Dispose Object ...
/// </summary>
public override void Dispose()
{
//
consumer.Close();
consumer.Dispose();
if (consumer != null)
{
consumer.Close();
consumer.Dispose();
}
//
GC.SuppressFinalize(this);
base.Dispose();
}