public RebusDistributedEventBus( IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IBus rebus, IOptions <AbpDistributedEventBusOptions> abpDistributedEventBusOptions, IOptions <AbpRebusEventBusOptions> abpEventBusRebusOptions, IRebusSerializer serializer, IGuidGenerator guidGenerator, IClock clock, IEventHandlerInvoker eventHandlerInvoker) : base( serviceScopeFactory, currentTenant, unitOfWorkManager, abpDistributedEventBusOptions, guidGenerator, clock, eventHandlerInvoker) { Rebus = rebus; Serializer = serializer; AbpRebusEventBusOptions = abpEventBusRebusOptions.Value; HandlerFactories = new ConcurrentDictionary <Type, List <IEventHandlerFactory> >(); EventTypes = new ConcurrentDictionary <string, Type>(); }
public AzureDistributedEventBus( IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IOptions <AbpDistributedEventBusOptions> abpDistributedEventBusOptions, IGuidGenerator guidGenerator, IClock clock, IOptions <AbpAzureEventBusOptions> abpAzureEventBusOptions, IAzureServiceBusSerializer serializer, IAzureServiceBusMessageConsumerFactory messageConsumerFactory, IPublisherPool publisherPool, IEventHandlerInvoker eventHandlerInvoker) : base(serviceScopeFactory, currentTenant, unitOfWorkManager, abpDistributedEventBusOptions, guidGenerator, clock, eventHandlerInvoker) { _options = abpAzureEventBusOptions.Value; _serializer = serializer; _messageConsumerFactory = messageConsumerFactory; _publisherPool = publisherPool; _handlerFactories = new ConcurrentDictionary <Type, List <IEventHandlerFactory> >(); _eventTypes = new ConcurrentDictionary <string, Type>(); }
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) : base( serviceScopeFactory, currentTenant, unitOfWorkManager, distributedEventBusOptions, guidGenerator, clock, eventHandlerInvoker) { ConnectionPool = connectionPool; Serializer = serializer; MessageConsumerFactory = messageConsumerFactory; AbpRabbitMqEventBusOptions = options.Value; HandlerFactories = new ConcurrentDictionary <Type, List <IEventHandlerFactory> >(); EventTypes = new ConcurrentDictionary <string, Type>(); }
public KafkaDistributedEventBus( IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IOptions <AbpKafkaEventBusOptions> abpKafkaEventBusOptions, IKafkaMessageConsumerFactory messageConsumerFactory, IOptions <AbpDistributedEventBusOptions> abpDistributedEventBusOptions, IKafkaSerializer serializer, IProducerPool producerPool, IGuidGenerator guidGenerator, IClock clock, IEventHandlerInvoker eventHandlerInvoker) : base( serviceScopeFactory, currentTenant, unitOfWorkManager, abpDistributedEventBusOptions, guidGenerator, clock, eventHandlerInvoker) { AbpKafkaEventBusOptions = abpKafkaEventBusOptions.Value; MessageConsumerFactory = messageConsumerFactory; Serializer = serializer; ProducerPool = producerPool; HandlerFactories = new ConcurrentDictionary <Type, List <IEventHandlerFactory> >(); EventTypes = new ConcurrentDictionary <string, Type>(); }
public InProcEventPublisher(EventHandlers eventHandlers, IEventHandlerInvoker eventHandlerInvoker) { Ensure.That(eventHandlers, "eventHandlers").IsNotNull(); Ensure.That(eventHandlerInvoker, "eventHandlerInvoker").IsNotNull(); EventHandlers = eventHandlers; EventHandlerInvoker = eventHandlerInvoker; }
public AbstractEventProcessor(string name, IEventHandlerInvoker eventHandlerInvoker, RollbackConfigurationType rollbackConfiguration, IErrorHandler errorHandler, IMessageMonitor messageMonitor) { EventHandlerInvoker = eventHandlerInvoker ?? throw new ArgumentNullException(nameof(name)); _rollbackConfiguration = rollbackConfiguration; _errorHandler = errorHandler ?? PropagatingErrorHandler.Instance; _messageMonitor = messageMonitor ?? NoOpMessageMonitor.Instance; Name = name ?? throw new ArgumentNullException(nameof(name)); }
public SubscribingEventProcessor(String name, IEventHandlerInvoker eventHandlerInvoker, ISubscribableMessageSource <IEventMessage> messageSource, IEventProcessingStrategy processingStrategy, IErrorHandler errorHandler) : this(name, eventHandlerInvoker, messageSource, processingStrategy, errorHandler, NoOpMessageMonitor.Instance) { }
public SubscribingEventProcessor(String name, IEventHandlerInvoker eventHandlerInvoker, ISubscribableMessageSource <IEventMessage> messageSource, IEventProcessingStrategy processingStrategy, IErrorHandler errorHandler, IMessageMonitor messageMonitor) : this(name, eventHandlerInvoker, RollbackConfigurationType.AnyThrowable, messageSource, processingStrategy, errorHandler, messageMonitor) { }
protected EventBusBase( IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IEventHandlerInvoker eventHandlerInvoker) { ServiceScopeFactory = serviceScopeFactory; CurrentTenant = currentTenant; UnitOfWorkManager = unitOfWorkManager; EventHandlerInvoker = eventHandlerInvoker; }
public SubscribingEventProcessor(String name, IEventHandlerInvoker eventHandlerInvoker, RollbackConfigurationType rollbackConfiguration, ISubscribableMessageSource <IEventMessage> messageSource, IEventProcessingStrategy processingStrategy, IErrorHandler errorHandler, IMessageMonitor messageMonitor) : base(name, eventHandlerInvoker, rollbackConfiguration, errorHandler, messageMonitor) { _messageSource = messageSource; _processingStrategy = processingStrategy; }
public LocalEventBus( IOptions <AbpLocalEventBusOptions> options, IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IEventHandlerInvoker eventHandlerInvoker) : base(serviceScopeFactory, currentTenant, unitOfWorkManager, eventHandlerInvoker) { Options = options.Value; Logger = NullLogger <LocalEventBus> .Instance; HandlerFactories = new ConcurrentDictionary <Type, List <IEventHandlerFactory> >(); SubscribeHandlers(Options.Handlers); }
protected DistributedEventBusBase( IServiceScopeFactory serviceScopeFactory, ICurrentTenant currentTenant, IUnitOfWorkManager unitOfWorkManager, IOptions <AbpDistributedEventBusOptions> abpDistributedEventBusOptions, IGuidGenerator guidGenerator, IClock clock, IEventHandlerInvoker eventHandlerInvoker ) : base( serviceScopeFactory, currentTenant, unitOfWorkManager, eventHandlerInvoker) { GuidGenerator = guidGenerator; Clock = clock; AbpDistributedEventBusOptions = abpDistributedEventBusOptions.Value; }
public InProcAsyncEventPublisher(EventHandlers eventHandlers, IEventHandlerInvoker eventHandlerInvoker) : base(eventHandlers, eventHandlerInvoker) { }
public EventHandlerInvoker_Tests() { _eventHandlerInvoker = GetRequiredService <IEventHandlerInvoker>(); }
public SubscribingEventProcessor(String name, IEventHandlerInvoker eventHandlerInvoker, ISubscribableMessageSource <IEventMessage> messageSource) : this(name, eventHandlerInvoker, messageSource, DirectEventProcessingStrategy.Instance, PropagatingErrorHandler.Instance) { }