示例#1
0
        /// <summary>
        /// Configure cluster client to use RabbitMQ persistent streams.
        /// </summary>
        public static IClientBuilder AddRabbitMQStreams(this IClientBuilder builder, string name, Action <ClusterClientRabbitMQStreamConfigurator> configure)
        {
            var configurator = new ClusterClientRabbitMQStreamConfigurator(name, builder);

            configure?.Invoke(configurator);
            return(builder);
        }
        /// <summary>
        /// Configure silo to use azure queue persistent streams.
        /// </summary>
        public static IClientBuilder AddRabbitMQStreams <TDataAdapter>(this IClientBuilder builder, string name, Action <ClusterClientRabbitMQStreamConfigurator <TDataAdapter> > configure)
            where TDataAdapter : IRabbitMQMapper
        {
            var configurator = new ClusterClientRabbitMQStreamConfigurator <TDataAdapter>(name, builder);

            configure?.Invoke(configurator);
            return(builder);
        }
        /// <summary>
        /// Configure cluster client to use RabbitMQ persistent streams.
        /// </summary>
        public static IClientBuilder AddRabbitMQStreams(this IClientBuilder builder,
                                                        string name,
                                                        Action <ClusterClientRabbitMQStreamConfigurator> configure)
        {
            // The constructor wires up DI with RabbitMQStream, so it has to be called regardless configure is null or not
            var configurator = new ClusterClientRabbitMQStreamConfigurator(name, builder);

            configure?.Invoke(configurator);
            return(builder);
        }