Remove Old Stuffs for Refactor xEvent Service for Kafka and RabbitMQ ...
This commit is contained in:
@@ -1,11 +0,0 @@
|
||||
using xEventService.Models;
|
||||
|
||||
namespace xEventService.Interfaces {
|
||||
public interface IXEventBus {
|
||||
bool Publish<T> (T @event) where T : XEvent;
|
||||
|
||||
bool Subscribe<TEvent, THandler> ()
|
||||
where TEvent : XEvent
|
||||
where THandler : IXEventHandler<TEvent>;
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using System.Threading.Tasks;
|
||||
using xEventService.Models;
|
||||
|
||||
namespace xEventService.Interfaces {
|
||||
public interface IXEventHandler<in TEvent> : IXEventHandler
|
||||
where TEvent : XEvent {
|
||||
Task HandleAsync (TEvent @event);
|
||||
}
|
||||
|
||||
public interface IXEventHandler { }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using xEventService.Models;
|
||||
|
||||
namespace xEventService.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// a Service for Produce Kafka Messages ...
|
||||
/// </summary>
|
||||
public interface IXKafkaProducerService : IDisposable
|
||||
{
|
||||
/// <summary>
|
||||
/// Sending Message ...
|
||||
/// </summary>
|
||||
/// <param name="request">an Instance of <see cref="XEventRequest"/> to Provides Kafka Messaging requirement ...</param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> SendMessageAsync(
|
||||
XEventRequest request,
|
||||
string topic = XEventServiceConstants.XDefaultTopic,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
|
||||
/// <summary>
|
||||
/// Sending a Message ...
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="topic"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
Task<bool> SendMessageAsync(
|
||||
XEventMessage message,
|
||||
string topic = XEventServiceConstants.XDefaultTopic,
|
||||
CancellationToken cancellationToken = default
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user