Show / Hide Table of Contents

Class RabbitMqDistributedEventBus

Inheritance
object
EventBusBase
DistributedEventBusBase
RabbitMqDistributedEventBus
Implements
IDistributedEventBus
IEventBus
ISupportsEventBoxes
ISingletonDependency
Inherited Members
DistributedEventBusBase.Subscribe<TEvent>(IDistributedEventHandler<TEvent>)
DistributedEventBusBase.PublishAsync(Type, object, bool)
DistributedEventBusBase.PublishAsync<TEvent>(TEvent, bool, bool)
DistributedEventBusBase.PublishAsync(Type, object, bool, bool)
DistributedEventBusBase.AddToOutboxAsync(Type, object)
DistributedEventBusBase.AddToInboxAsync(string, string, Type, object, string)
DistributedEventBusBase.TriggerHandlersDirectAsync(Type, object)
DistributedEventBusBase.TriggerHandlersFromInboxAsync(Type, object, List<Exception>, InboxConfig)
DistributedEventBusBase.TriggerDistributedEventSentAsync(DistributedEventSent)
DistributedEventBusBase.TriggerDistributedEventReceivedAsync(DistributedEventReceived)
DistributedEventBusBase.GuidGenerator
DistributedEventBusBase.Clock
DistributedEventBusBase.AbpDistributedEventBusOptions
DistributedEventBusBase.LocalEventBus
DistributedEventBusBase.CorrelationIdProvider
EventBusBase.Subscribe<TEvent>(Func<TEvent, Task>)
EventBusBase.Subscribe<TEvent, THandler>()
EventBusBase.Subscribe(Type, IEventHandler)
EventBusBase.Subscribe<TEvent>(IEventHandlerFactory)
EventBusBase.Unsubscribe<TEvent>(ILocalEventHandler<TEvent>)
EventBusBase.Unsubscribe<TEvent>(IEventHandlerFactory)
EventBusBase.UnsubscribeAll<TEvent>()
EventBusBase.PublishAsync<TEvent>(TEvent, bool)
EventBusBase.TriggerHandlersAsync(Type, object)
EventBusBase.TriggerHandlersAsync(Type, object, List<Exception>, InboxConfig)
EventBusBase.ThrowOriginalExceptions(Type, List<Exception>)
EventBusBase.SubscribeHandlers(ITypeList<IEventHandler>)
EventBusBase.TriggerHandlerAsync(IEventHandlerFactory, Type, object, List<Exception>, InboxConfig)
EventBusBase.InvokeEventHandlerAsync(IEventHandler, object, Type)
EventBusBase.GetEventDataTenantId(object)
EventBusBase.ServiceScopeFactory
EventBusBase.CurrentTenant
EventBusBase.UnitOfWorkManager
EventBusBase.EventHandlerInvoker
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Volo.Abp.EventBus.RabbitMq
Assembly: Volo.Abp.EventBus.RabbitMQ.dll
Syntax
[Dependency(ReplaceServices = true)]
[ExposeServices(new Type[] { typeof(IDistributedEventBus), typeof(RabbitMqDistributedEventBus) })]
public class RabbitMqDistributedEventBus : DistributedEventBusBase, IDistributedEventBus, IEventBus, ISupportsEventBoxes, ISingletonDependency

Constructors

RabbitMqDistributedEventBus(IOptions<AbpRabbitMqEventBusOptions>, IConnectionPool, IRabbitMqSerializer, IServiceScopeFactory, IOptions<AbpDistributedEventBusOptions>, IRabbitMqMessageConsumerFactory, ICurrentTenant, IUnitOfWorkManager, IGuidGenerator, IClock, IEventHandlerInvoker, ILocalEventBus, ICorrelationIdProvider)

Declaration
public RabbitMqDistributedEventBus(IOptions<AbpRabbitMqEventBusOptions> options, IConnectionPool connectionPool, IRabbitMqSerializer serializer, IServiceScopeFactory serviceScopeFactory, IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions, IRabbitMqMessageConsumerFactory messageConsumerFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IGuidGenerator guidGenerator, IClock clock, IEventHandlerInvoker eventHandlerInvoker, ILocalEventBus localEventBus, ICorrelationIdProvider correlationIdProvider)
Parameters
Type Name Description
IOptions<AbpRabbitMqEventBusOptions> options
IConnectionPool connectionPool
IRabbitMqSerializer serializer
IServiceScopeFactory serviceScopeFactory
IOptions<AbpDistributedEventBusOptions> distributedEventBusOptions
IRabbitMqMessageConsumerFactory messageConsumerFactory
ICurrentTenant currentTenant
IUnitOfWorkManager unitOfWorkManager
IGuidGenerator guidGenerator
IClock clock
IEventHandlerInvoker eventHandlerInvoker
ILocalEventBus localEventBus
ICorrelationIdProvider correlationIdProvider

Properties

AbpRabbitMqEventBusOptions

Declaration
protected AbpRabbitMqEventBusOptions AbpRabbitMqEventBusOptions { get; }
Property Value
Type Description
AbpRabbitMqEventBusOptions

ConnectionPool

Declaration
protected IConnectionPool ConnectionPool { get; }
Property Value
Type Description
IConnectionPool

Consumer

Declaration
protected IRabbitMqMessageConsumer Consumer { get; }
Property Value
Type Description
IRabbitMqMessageConsumer

EventTypes

Declaration
protected ConcurrentDictionary<string, Type> EventTypes { get; }
Property Value
Type Description
ConcurrentDictionary<string, Type>

HandlerFactories

Declaration
protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
Property Value
Type Description
ConcurrentDictionary<Type, List<IEventHandlerFactory>>

MessageConsumerFactory

Declaration
protected IRabbitMqMessageConsumerFactory MessageConsumerFactory { get; }
Property Value
Type Description
IRabbitMqMessageConsumerFactory

Serializer

Declaration
protected IRabbitMqSerializer Serializer { get; }
Property Value
Type Description
IRabbitMqSerializer

Methods

AddToUnitOfWork(IUnitOfWork, UnitOfWorkEventRecord)

Declaration
protected override void AddToUnitOfWork(IUnitOfWork unitOfWork, UnitOfWorkEventRecord eventRecord)
Parameters
Type Name Description
IUnitOfWork unitOfWork
UnitOfWorkEventRecord eventRecord
Overrides
EventBusBase.AddToUnitOfWork(IUnitOfWork, UnitOfWorkEventRecord)

GetHandlerFactories(Type)

Declaration
protected override IEnumerable<EventBusBase.EventTypeWithEventHandlerFactories> GetHandlerFactories(Type eventType)
Parameters
Type Name Description
Type eventType
Returns
Type Description
IEnumerable<EventBusBase.EventTypeWithEventHandlerFactories>
Overrides
EventBusBase.GetHandlerFactories(Type)

Initialize()

Declaration
public void Initialize()

OnAddToOutboxAsync(string, Type, object)

Declaration
protected override Task OnAddToOutboxAsync(string eventName, Type eventType, object eventData)
Parameters
Type Name Description
string eventName
Type eventType
object eventData
Returns
Type Description
Task
Overrides
DistributedEventBusBase.OnAddToOutboxAsync(string, Type, object)

ProcessFromInboxAsync(IncomingEventInfo, InboxConfig)

Declaration
public override Task ProcessFromInboxAsync(IncomingEventInfo incomingEvent, InboxConfig inboxConfig)
Parameters
Type Name Description
IncomingEventInfo incomingEvent
InboxConfig inboxConfig
Returns
Type Description
Task
Overrides
DistributedEventBusBase.ProcessFromInboxAsync(IncomingEventInfo, InboxConfig)

PublishAsync(IModel, string, byte[], Dictionary<string, object>?, Guid?, string?)

Declaration
protected virtual Task PublishAsync(IModel channel, string eventName, byte[] body, Dictionary<string, object>? headersArguments = null, Guid? eventId = null, string? correlationId = null)
Parameters
Type Name Description
IModel channel
string eventName
byte[] body
Dictionary<string, object> headersArguments
Guid? eventId
string correlationId
Returns
Type Description
Task

PublishAsync(string, byte[], Dictionary<string, object>?, Guid?, string?)

Declaration
protected virtual Task PublishAsync(string eventName, byte[] body, Dictionary<string, object>? headersArguments = null, Guid? eventId = null, string? correlationId = null)
Parameters
Type Name Description
string eventName
byte[] body
Dictionary<string, object> headersArguments
Guid? eventId
string correlationId
Returns
Type Description
Task

PublishAsync(Type, object, Dictionary<string, object>?, Guid?, string?)

Declaration
public virtual Task PublishAsync(Type eventType, object eventData, Dictionary<string, object>? headersArguments = null, Guid? eventId = null, string? correlationId = null)
Parameters
Type Name Description
Type eventType
object eventData
Dictionary<string, object> headersArguments
Guid? eventId
string correlationId
Returns
Type Description
Task

PublishFromOutboxAsync(OutgoingEventInfo, OutboxConfig)

Declaration
public override Task PublishFromOutboxAsync(OutgoingEventInfo outgoingEvent, OutboxConfig outboxConfig)
Parameters
Type Name Description
OutgoingEventInfo outgoingEvent
OutboxConfig outboxConfig
Returns
Type Description
Task
Overrides
DistributedEventBusBase.PublishFromOutboxAsync(OutgoingEventInfo, OutboxConfig)

PublishManyFromOutboxAsync(IEnumerable<OutgoingEventInfo>, OutboxConfig)

Declaration
public override Task PublishManyFromOutboxAsync(IEnumerable<OutgoingEventInfo> outgoingEvents, OutboxConfig outboxConfig)
Parameters
Type Name Description
IEnumerable<OutgoingEventInfo> outgoingEvents
OutboxConfig outboxConfig
Returns
Type Description
Task
Overrides
DistributedEventBusBase.PublishManyFromOutboxAsync(IEnumerable<OutgoingEventInfo>, OutboxConfig)

PublishToEventBusAsync(Type, object)

Declaration
protected override Task PublishToEventBusAsync(Type eventType, object eventData)
Parameters
Type Name Description
Type eventType
object eventData
Returns
Type Description
Task
Overrides
EventBusBase.PublishToEventBusAsync(Type, object)

Serialize(object)

Declaration
protected override byte[] Serialize(object eventData)
Parameters
Type Name Description
object eventData
Returns
Type Description
byte[]
Overrides
DistributedEventBusBase.Serialize(object)

Subscribe(Type, IEventHandlerFactory)

Declaration
public override IDisposable Subscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
Type eventType
IEventHandlerFactory factory
Returns
Type Description
IDisposable
Overrides
EventBusBase.Subscribe(Type, IEventHandlerFactory)

Unsubscribe(Type, IEventHandler)

Declaration
public override void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
Type Name Description
Type eventType
IEventHandler handler
Overrides
EventBusBase.Unsubscribe(Type, IEventHandler)

Unsubscribe(Type, IEventHandlerFactory)

Declaration
public override void Unsubscribe(Type eventType, IEventHandlerFactory factory)
Parameters
Type Name Description
Type eventType
IEventHandlerFactory factory
Overrides
EventBusBase.Unsubscribe(Type, IEventHandlerFactory)

UnsubscribeAll(Type)

Declaration
public override void UnsubscribeAll(Type eventType)
Parameters
Type Name Description
Type eventType
Overrides
EventBusBase.UnsubscribeAll(Type)

Unsubscribe<TEvent>(Func<TEvent, Task>)

Declaration
public override void Unsubscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
Type Name Description
Func<TEvent, Task> action
Type Parameters
Name Description
TEvent
Overrides
EventBusBase.Unsubscribe<TEvent>(Func<TEvent, Task>)

Implements

IDistributedEventBus
IEventBus
ISupportsEventBoxes
ISingletonDependency

Extension Methods

AbpObjectExtensions.As<T>(object)
AbpObjectExtensions.To<T>(object)
LockExtensions.Locking(object, Action)
LockExtensions.Locking<TResult>(object, Func<TResult>)
AbpObjectExtensions.If<T>(T, bool, Action<T>)
AbpObjectExtensions.If<T>(T, bool, Func<T, T>)
AbpObjectExtensions.IsIn<T>(T, IEnumerable<T>)
AbpObjectExtensions.IsIn<T>(T, params T[])
AbpQueryableExtensions.OrderByIf<T, TQueryable>(TQueryable, bool, string)
AbpQueryableExtensions.PageBy<T, TQueryable>(TQueryable, int, int)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, bool>>)
AbpQueryableExtensions.WhereIf<T, TQueryable>(TQueryable, bool, Expression<Func<T, int, bool>>)
AbpOpenIddictQueryableExtensions.SkipIf<T, TQueryable>(TQueryable, bool, int?)
AbpOpenIddictQueryableExtensions.TakeIf<T, TQueryable>(TQueryable, bool, int?)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In this article
Back to top Powered by ABP.IO Platform