Class KafkaDistributedEventBus
Inheritance
System.Object
KafkaDistributedEventBus
Implements
ISingletonDependency
Inherited Members
Volo.Abp.EventBus.EventBusBase.Subscribe<TEvent>(Func<, >)
Volo.Abp.EventBus.EventBusBase.Unsubscribe<TEvent>(Func<, >)
Volo.Abp.EventBus.EventBusBase.TriggerHandlersAsync(Type, System.Object, List<>)
Volo.Abp.EventBus.EventBusBase.TriggerHandlerAsync(Volo.Abp.EventBus.IEventHandlerFactory, Type, System.Object, List<>)
Assembly: Volo.Abp.EventBus.Kafka.dll
Syntax
public class KafkaDistributedEventBus : EventBusBase, IDistributedEventBus, IEventBus, ISingletonDependency
Constructors
KafkaDistributedEventBus(IServiceScopeFactory, ICurrentTenant, IOptions<AbpKafkaEventBusOptions>, IKafkaMessageConsumerFactory, IOptions<AbpDistributedEventBusOptions>, IKafkaSerializer, IProducerPool)
Declaration
public KafkaDistributedEventBus(IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IOptions<AbpKafkaEventBusOptions> abpKafkaEventBusOptions, IKafkaMessageConsumerFactory messageConsumerFactory, IOptions<AbpDistributedEventBusOptions> abpDistributedEventBusOptions, IKafkaSerializer serializer, IProducerPool producerPool)
Parameters
Properties
AbpDistributedEventBusOptions
Declaration
protected AbpDistributedEventBusOptions AbpDistributedEventBusOptions { get; }
Property Value
AbpKafkaEventBusOptions
Declaration
protected AbpKafkaEventBusOptions AbpKafkaEventBusOptions { get; }
Property Value
Consumer
Declaration
protected IKafkaMessageConsumer Consumer { get; }
Property Value
EventTypes
Declaration
protected ConcurrentDictionary<string, Type> EventTypes { get; }
Property Value
Type |
Description |
ConcurrentDictionary<System.String, Type> |
|
HandlerFactories
Declaration
protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
Property Value
MessageConsumerFactory
Declaration
protected IKafkaMessageConsumerFactory MessageConsumerFactory { get; }
Property Value
ProducerPool
Declaration
protected IProducerPool ProducerPool { get; }
Property Value
Serializer
Declaration
protected IKafkaSerializer Serializer { get; }
Property Value
Methods
GetHandlerFactories(Type)
Declaration
protected override IEnumerable<EventBusBase.EventTypeWithEventHandlerFactories> GetHandlerFactories(Type eventType)
Parameters
Type |
Name |
Description |
Type |
eventType |
|
Returns
Initialize()
Declaration
PublishAsync(Type, Object)
Declaration
public override Task PublishAsync(Type eventType, object eventData)
Parameters
Type |
Name |
Description |
Type |
eventType |
|
System.Object |
eventData |
|
Returns
Subscribe(Type, IEventHandlerFactory)
Declaration
public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Returns
Type |
Description |
IDisposable |
|
Subscribe<TEvent>(IDistributedEventHandler<TEvent>)
Declaration
public IDisposable Subscribe<TEvent>(IDistributedEventHandler<TEvent> handler)
where TEvent : class
Parameters
Returns
Type |
Description |
IDisposable |
|
Type Parameters
Unsubscribe(Type, IEventHandler)
Declaration
public override void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
Unsubscribe(Type, IEventHandlerFactory)
Declaration
public override void Unsubscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Unsubscribe<TEvent>(Func<TEvent, Task>)
Declaration
public override void Unsubscribe<TEvent>(Func<TEvent, Task> action)
Parameters
Type |
Name |
Description |
Func<TEvent, Task> |
action |
|
Type Parameters
UnsubscribeAll(Type)
Declaration
public override void UnsubscribeAll(Type eventType)
Parameters
Type |
Name |
Description |
Type |
eventType |
|
Implements
ISingletonDependency
Extension Methods