示例#1
0
        public IMQBus <IRocketMQProducerProvider> CreateMQBus(IMQBusRegistration registration)
        {
            var configurator = new RocketMQFactoryConfigurator();

            _configure?.Invoke(registration, configurator);

            return(configurator.Build(registration));
        }
        public RocketMQBus(IMQBusRegistration registration,
                           IRocketMQProducerProvider producerProvider, IRocketMQConsumerContainer consumerContainer)
        {
            _registration = registration;

            _producerProvider  = producerProvider;
            _consumerContainer = consumerContainer;
        }
示例#3
0
 public static void BindTypedMessageConsumer <TContent, TTypedMessageConsumer>(this IRocketMQConsumerConfigurator configurator,
                                                                               IMQBusRegistration registration)
     where TContent : class
     where TTypedMessageConsumer : class, IMQTypedMessageConsumer <MessageExt, TContent>
 {
     configurator.BindTypedMessageConsumer <MessageExt, TContent, TTypedMessageConsumer>(registration);
 }
示例#4
0
 public static void BindMessageConsumer <TMessageConsumer>(this IRocketMQConsumerConfigurator configurator, IMQBusRegistration registration)
     where TMessageConsumer : class, IMQMessageConsumer
 {
     configurator.BindMessageConsumer <MessageExt, TMessageConsumer>(registration);
 }
 public static void BindMessageConsumer <TMessage, TMessageConsumer>(this IMQConsumerConfigurator <TMessage> configurator, IMQBusRegistration registration)
     where TMessage : class
     where TMessageConsumer : class, IMQMessageConsumer
 {
     registration.ConfigureMessageConsumer <TMessage, TMessageConsumer>(configurator);
 }