public ApplicationMessageSubscriber( IMessageQueueConsumerFactory queueConsumerFactory, IMessageSubscriptionManager subscriptionManager, IApplicationMessageProcessor processor, ILogger <ApplicationMessageSubscriber> logger, VoguediOptions options) : base(queueConsumerFactory, subscriptionManager, processor, logger, options.DefaultApplicationMessageGroupName, options.DefaultApplicationTopicQueueCount) { }
public CommandSubscriber( IMessageQueueConsumerFactory queueConsumerFactory, IMessageSubscriptionManager subscriptionManager, ICommandProcessor processor, ILogger <CommandSubscriber> logger, VoguediOptions options) : base(queueConsumerFactory, subscriptionManager, processor, logger, options.DefaultCommandGroupName, options.DefaultCommandTopicQueueCount) { }
public EventSubscriber( IMessageQueueConsumerFactory queueConsumerFactory, IMessageSubscriptionManager subscriptionManager, IEventProcessor processor, ILogger <EventSubscriber> logger, VoguediOptions options) : base(queueConsumerFactory, subscriptionManager, processor, logger, options.DefaultEventGroupName, options.DefaultEventTopicQueueCount) { }
public static void SubscribeHandlerForEvents <TEntity, THandler>(this IMessageSubscriptionManager subscriptionManager, string exchange, string entityTypeName) where THandler : IEntityEventsHandler <TEntity> { subscriptionManager.RegisterBinding <EntityCreated <TEntity> >(exchange, $"{entityTypeName}:EntityCreated"); subscriptionManager.RegisterBinding <EntityUpdated <TEntity> >(exchange, $"{entityTypeName}:EntityUpdated"); subscriptionManager.RegisterBinding <EntityDeleted <TEntity> >(exchange, $"{entityTypeName}:EntityDeleted"); subscriptionManager.Subscribe <EntityCreated <TEntity>, THandler>(); subscriptionManager.Subscribe <EntityUpdated <TEntity>, THandler>(); subscriptionManager.Subscribe <EntityDeleted <TEntity>, THandler>(); }
protected MessageSubscriber( IMessageQueueConsumerFactory consumerFactory, IMessageSubscriptionManager subscriptionManager, IMessageProcessor processor, ILogger logger, string defaultGroupName, int defaultTopicQueueCount) { this.queueConsumerFactory = consumerFactory; this.subscriptionManager = subscriptionManager; this.processor = processor; this.logger = logger; this.defaultGroupName = defaultGroupName; this.defaultTopicQueueCount = defaultTopicQueueCount; timeout = TimeSpan.FromSeconds(1); cancellationTokenSource = new CancellationTokenSource(); }
public static void SubscribeForEvents <TEntity, TEvent>(this IMessageSubscriptionManager subscriptionManager, string exchange, string eventName) { SubscribeHandlerForEvents <TEvent, EntityEventsHandler <TEntity, TEvent> >(subscriptionManager, exchange, eventName); }
public static void SubscribeHandlerForEvents <TEntity, THandler>(this IMessageSubscriptionManager subscriptionManager, string exchange) where THandler : IEntityEventsHandler <TEntity> { SubscribeHandlerForEvents <TEntity, THandler>(subscriptionManager, exchange, typeof(TEntity).Name); }
public MessagePublisher(IMessageQueueProducer queueProducer, IMessageSubscriptionManager subscriptionManager, IStringObjectSerializer objectSerializer) { this.queueProducer = queueProducer; this.subscriptionManager = subscriptionManager; this.objectSerializer = objectSerializer; }