/// <summary> /// Configuration to use kafka in Caf. /// </summary> /// <param name="options">Caf configuration options</param> /// <param name="configure">Provides programmatic configuration for the kafka .</param> /// <returns></returns> public static IntegrationEventBusOptions UseKafka(this IntegrationEventBusOptions options, Action <KafkaOptions> configure) { if (configure == null) { throw new ArgumentNullException(nameof(configure)); } options.RegisterExtension(new CafKafkaOptionsExtension(configure)); return(options); }
/// <summary> /// Configuration to use kafka in Caf. /// </summary> /// <param name="options">Caf configuration options</param> /// <param name="bootstrapServers">Kafka bootstrap server urls.</param> public static IntegrationEventBusOptions UseKafka(this IntegrationEventBusOptions options, string bootstrapServers) { return(options.UseKafka(opt => { opt.Servers = bootstrapServers; })); }