Show / Hide Table of Contents

Class RebusDistributedEventBus

Inheritance
object
EventBusBase
DistributedEventBusBase
RebusDistributedEventBus
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.AddToInboxAsync(string, string, Type, byte[])
DistributedEventBusBase.GuidGenerator
DistributedEventBusBase.Clock
DistributedEventBusBase.AbpDistributedEventBusOptions
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.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.Rebus
Assembly: Volo.Abp.EventBus.Rebus.dll
Syntax
[Dependency(ReplaceServices = true)]
[ExposeServices(new Type[] { typeof(IDistributedEventBus), typeof(RebusDistributedEventBus) })]
public class RebusDistributedEventBus : DistributedEventBusBase, IDistributedEventBus, IEventBus, ISupportsEventBoxes, ISingletonDependency

Constructors

RebusDistributedEventBus(IServiceScopeFactory, ICurrentTenant, IUnitOfWorkManager, IBus, IOptions<AbpDistributedEventBusOptions>, IOptions<AbpRebusEventBusOptions>, IRebusSerializer, IGuidGenerator, IClock, IEventHandlerInvoker)

Declaration
public RebusDistributedEventBus(IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IBus rebus, IOptions<AbpDistributedEventBusOptions> abpDistributedEventBusOptions, IOptions<AbpRebusEventBusOptions> abpEventBusRebusOptions, IRebusSerializer serializer, IGuidGenerator guidGenerator, IClock clock, IEventHandlerInvoker eventHandlerInvoker)
Parameters
Type Name Description
Microsoft.Extensions.DependencyInjection.IServiceScopeFactory serviceScopeFactory
ICurrentTenant currentTenant
IUnitOfWorkManager unitOfWorkManager
Rebus.Bus.IBus rebus
Microsoft.Extensions.Options.IOptions<TOptions><AbpDistributedEventBusOptions> abpDistributedEventBusOptions
Microsoft.Extensions.Options.IOptions<TOptions><AbpRebusEventBusOptions> abpEventBusRebusOptions
IRebusSerializer serializer
IGuidGenerator guidGenerator
IClock clock
IEventHandlerInvoker eventHandlerInvoker

Properties

AbpRebusEventBusOptions

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

EventTypes

Declaration
protected ConcurrentDictionary<string, Type> EventTypes { get; }
Property Value
Type Description
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue><string, System.Type>

HandlerFactories

Declaration
protected ConcurrentDictionary<Type, List<IEventHandlerFactory>> HandlerFactories { get; }
Property Value
Type Description
System.Collections.Concurrent.ConcurrentDictionary<TKey, TValue><System.Type, System.Collections.Generic.List<T><IEventHandlerFactory>>

Rebus

Declaration
protected IBus Rebus { get; }
Property Value
Type Description
Rebus.Bus.IBus

Serializer

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

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
System.Type eventType
Returns
Type Description
System.Collections.Generic.IEnumerable<T><EventBusBase.EventTypeWithEventHandlerFactories>
Overrides
EventBusBase.GetHandlerFactories(Type)

Initialize()

Declaration
public void Initialize()

ProcessEventAsync(Type, object)

Declaration
public Task ProcessEventAsync(Type eventType, object eventData)
Parameters
Type Name Description
System.Type eventType
object eventData
Returns
Type Description
System.Threading.Tasks.Task

ProcessFromInboxAsync(IncomingEventInfo, InboxConfig)

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

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

Declaration
protected virtual Task PublishAsync(Type eventType, object eventData, Guid? eventId = null, Dictionary<string, string> headersArguments = null)
Parameters
Type Name Description
System.Type eventType
object eventData
System.Guid? eventId
System.Collections.Generic.Dictionary<TKey, TValue><string, string> headersArguments
Returns
Type Description
System.Threading.Tasks.Task

PublishFromOutboxAsync(OutgoingEventInfo, OutboxConfig)

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

PublishManyFromOutboxAsync(IEnumerable<OutgoingEventInfo>, OutboxConfig)

Declaration
public override Task PublishManyFromOutboxAsync(IEnumerable<OutgoingEventInfo> outgoingEvents, OutboxConfig outboxConfig)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<T><OutgoingEventInfo> outgoingEvents
OutboxConfig outboxConfig
Returns
Type Description
System.Threading.Tasks.Task
Overrides
DistributedEventBusBase.PublishManyFromOutboxAsync(IEnumerable<OutgoingEventInfo>, OutboxConfig)

PublishToEventBusAsync(Type, object)

Declaration
protected override Task PublishToEventBusAsync(Type eventType, object eventData)
Parameters
Type Name Description
System.Type eventType
object eventData
Returns
Type Description
System.Threading.Tasks.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
System.Type eventType
IEventHandlerFactory factory
Returns
Type Description
System.IDisposable
Overrides
EventBusBase.Subscribe(Type, IEventHandlerFactory)

Unsubscribe(Type, IEventHandler)

Declaration
public override void Unsubscribe(Type eventType, IEventHandler handler)
Parameters
Type Name Description
System.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
System.Type eventType
IEventHandlerFactory factory
Overrides
EventBusBase.Unsubscribe(Type, IEventHandlerFactory)

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

Declaration
public override void Unsubscribe<TEvent>(Func<TEvent, Task> action) where TEvent : class
Parameters
Type Name Description
System.Func<T, TResult><TEvent, System.Threading.Tasks.Task> action
Type Parameters
Name Description
TEvent
Overrides
Volo.Abp.EventBus.EventBusBase.Unsubscribe<TEvent>(System.Func<TEvent, System.Threading.Tasks.Task>)

UnsubscribeAll(Type)

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

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>>)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
In This Article
Back to top Powered by Volosoft