public RabbitMQSubscription( IRabbitMQMessageBus messageBus, SubscriptionId subscriptionId, TopicId topicId, Type messageType, string queueName, SubscriptionMode subscriptionMode, bool acceptMessagesOlderThanSubscriptionTime, Action<object> messageHandler, Action<object, object> messageHandlerWithProperties, Action<object, Dictionary<string, string>> messageHandlerWithHeaders, Action<object, object, Dictionary<string, string>> messageHandlerWithPropertiesAndHeaders) : base(subscriptionId, topicId, messageType, queueName, subscriptionMode, acceptMessagesOlderThanSubscriptionTime, messageHandler, messageHandlerWithProperties, messageHandlerWithHeaders, messageHandlerWithPropertiesAndHeaders) { if (topicId == null) throw new ArgumentNullException("topicId"); MessageBus = messageBus; }
protected virtual RabbitMQConsumer NewConsumer(IRabbitMQMessageBus messageBus) { return new RabbitMQConsumer(this, messageBus); }
internal RabbitMQAuthorizedConsumer(RabbitMQSubscription subscription, AuthorizedMessageOperation operation, IRabbitMQMessageBus messageBus) : base(subscription, messageBus) { Operation = operation; }
public RabbitMQAuthorizedSubscription(IRabbitMQMessageBus messageBus, AuthorizedMessageOperation operation, SubscriptionId subscriptionId, TopicId topicId, Type messageType, string queueName, SubscriptionMode subscriptionMode, bool acceptMessagesOlderThanSubscriptionTime, Action<object> messageHandler, Action<object, object> messageHandlerWithProperties, Action<object, Dictionary<string, string>> messageHandlerWithHeaders, Action<object, object, Dictionary<string, string>> messageHandlerWithPropertiesAndHeaders) : base(messageBus, subscriptionId, topicId, messageType, queueName, subscriptionMode, acceptMessagesOlderThanSubscriptionTime, messageHandler, messageHandlerWithProperties, messageHandlerWithHeaders, messageHandlerWithPropertiesAndHeaders) { Operation = operation; }
protected override RabbitMQConsumer NewConsumer(IRabbitMQMessageBus messageBus) { return new RabbitMQAuthorizedConsumer(this, Operation, messageBus); }
public static Task PublishAsync <T>(this IRabbitMQMessageBus messageBus, T message) { return(messageBus.PublishAsync(typeof(T), message)); }
public static Task PublishDelayAsync <T>(this IRabbitMQMessageBus messageBus, T message, TimeSpan delay) { return(messageBus.PublishDelayAsync(typeof(T), message, delay)); }
public MessageBusConsumeService(ILogger <MessageBusConsumeService> logger, IRabbitMQMessageBus messageBus) { _logger = logger; _messageBus = messageBus; }
public MessageBusProduerService(ILogger <MessageBusProduerService> logger, IRabbitMQMessageBus messageBus, CmdOptions cmdOptions) { _logger = logger; _messageBus = messageBus; _cmdOptions = cmdOptions; }
internal RabbitMQConsumer(RabbitMQSubscription subscription, IRabbitMQMessageBus messageBus) { Subscription = subscription; MessageBus = messageBus; Model = MessageBus.NewChannel(); }