private static IClientBuilder WithRabbitMQ(this IClientBuilder builder, IConfiguration configRoot) { return(builder .AddRabbitMQStreams <RabbitMQDefaultMapper>(name: rabbitmqName, configure: null) //.AddRabbitMQStreams<RabbitMQDefaultMapper>(rabbitmqName, ob => // ob.Configure(op => // { // op.Mode = StreamProviderDirection.ReadWrite; // op.NumberOfQueues = 8; // op.HostName = "localhost"; // op.Port = 5671; // op.VirtualHost = "/"; // op.Exchange = "exchange"; // op.ExchangeType = "direct"; // op.ExchangeDurable = false; // op.AutoDelete = true; // op.Queue = "queue"; // op.QueueDurable = false; // op.Namespace = "TestNamespace"; // op.RoutingKey = "#"; // op.Username = "******"; // op.Password = "******"; // })) .ConfigureServices(s => s.Configure <RabbitMQStreamProviderOptions>(rabbitmqName, configRoot.GetSection(RabbitMQStreamProviderOptions.SECTION_NAME)))); }
/// <summary> /// Configure silo to use azure queue persistent streams with default settings /// </summary> public static IClientBuilder AddRabbitMQStreams <TDataAdapter>(this IClientBuilder builder, string name, Action <OptionsBuilder <RabbitMQStreamProviderOptions> > configureOptions) where TDataAdapter : IRabbitMQMapper { builder.AddRabbitMQStreams <TDataAdapter>(name, b => b.ConfigureRabbitMQ(configureOptions)); return(builder); }
public virtual void Configure(IConfiguration configuration, IClientBuilder clientBuilder) => clientBuilder .AddRabbitMQStreams(Constants.RabbitMQStreamProvider, builder => { builder.Configure(options => { options.HostName = TestBase.HostName; options.UserName = TestBase.UserName; options.Password = TestBase.Password; }); }) .ConfigureApplicationParts(parts => parts.AddApplicationPart(typeof(LoopbackGrain).Assembly).WithReferences());
{ /// <summary> /// Configure cluster client to use RabbitMQ with default settings /// </summary> public static IClientBuilder AddRabbitMQStreams(this IClientBuilder builder, string name, Action <RabbitMQStreamProviderOptions> configureOptions) { builder.AddRabbitMQStreams(name, b => b.ConfigureRabbitMQ(ob => ob.Configure(configureOptions))); return(builder); }
/// <summary> /// Configure cluster client to use RabbitMQ persistent streams. /// </summary> public static IClientBuilder AddRabbitMQStreams(this IClientBuilder builder, string name, Action <OptionsBuilder <RabbitMQOptions> > configureOptions) { builder.AddRabbitMQStreams(name, b => b.ConfigureRabbitMQ(configureOptions)); return(builder); }