Udostępnij za pośrednictwem


AspireKafkaConsumerExtensions.AddKeyedKafkaConsumer Method

Definition

Overloads

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String)

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<KafkaConsumerSettings>)

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<ConsumerBuilder<TKey,TValue>>)

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<IServiceProvider,ConsumerBuilder<TKey,TValue>>)

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<KafkaConsumerSettings>, Action<ConsumerBuilder<TKey,TValue>>)

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<KafkaConsumerSettings>, Action<IServiceProvider,ConsumerBuilder<TKey, TValue>>)

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String)

Source:
AspireKafkaConsumerExtensions.cs
Source:
AspireKafkaConsumerExtensions.cs

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

public static void AddKeyedKafkaConsumer<TKey,TValue> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name);
static member AddKeyedKafkaConsumer : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string -> unit
<Extension()>
Public Sub AddKeyedKafkaConsumer(Of TKey, TValue) (builder As IHostApplicationBuilder, name As String)

Type Parameters

TKey
TValue

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
String

The name of the component, which is used as the ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section.

Applies to

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<KafkaConsumerSettings>)

Source:
AspireKafkaConsumerExtensions.cs
Source:
AspireKafkaConsumerExtensions.cs

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

public static void AddKeyedKafkaConsumer<TKey,TValue> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name, Action<Aspire.Confluent.Kafka.KafkaConsumerSettings>? configureSettings);
static member AddKeyedKafkaConsumer : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<Aspire.Confluent.Kafka.KafkaConsumerSettings> -> unit
<Extension()>
Public Sub AddKeyedKafkaConsumer(Of TKey, TValue) (builder As IHostApplicationBuilder, name As String, configureSettings As Action(Of KafkaConsumerSettings))

Type Parameters

TKey
TValue

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
String

The name of the component, which is used as the ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section.

configureSettings
Action<KafkaConsumerSettings>

An optional method for customizing the KafkaConsumerSettings.

Applies to

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<ConsumerBuilder<TKey,TValue>>)

Source:
AspireKafkaConsumerExtensions.cs
Source:
AspireKafkaConsumerExtensions.cs

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

public static void AddKeyedKafkaConsumer<TKey,TValue> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name, Action<Confluent.Kafka.ConsumerBuilder<TKey,TValue>>? configureBuilder);
static member AddKeyedKafkaConsumer : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<Confluent.Kafka.ConsumerBuilder<'Key, 'Value>> -> unit
<Extension()>
Public Sub AddKeyedKafkaConsumer(Of TKey, TValue) (builder As IHostApplicationBuilder, name As String, configureBuilder As Action(Of ConsumerBuilder(Of TKey, TValue)))

Type Parameters

TKey
TValue

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
String

The name of the component, which is used as the ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section.

configureBuilder
Action<Confluent.Kafka.ConsumerBuilder<TKey,TValue>>

An optional method used for customizing the Confluent.Kafka.ConsumerBuilder`2.

Applies to

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<IServiceProvider,ConsumerBuilder<TKey,TValue>>)

Source:
AspireKafkaConsumerExtensions.cs
Source:
AspireKafkaConsumerExtensions.cs

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

public static void AddKeyedKafkaConsumer<TKey,TValue> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name, Action<IServiceProvider,Confluent.Kafka.ConsumerBuilder<TKey,TValue>>? configureBuilder);
static member AddKeyedKafkaConsumer : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<IServiceProvider, Confluent.Kafka.ConsumerBuilder<'Key, 'Value>> -> unit
<Extension()>
Public Sub AddKeyedKafkaConsumer(Of TKey, TValue) (builder As IHostApplicationBuilder, name As String, configureBuilder As Action(Of IServiceProvider, ConsumerBuilder(Of TKey, TValue)))

Type Parameters

TKey
TValue

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
String

The name of the component, which is used as the ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section.

configureBuilder
Action<IServiceProvider,Confluent.Kafka.ConsumerBuilder<TKey,TValue>>

An optional method used for customizing the Confluent.Kafka.ConsumerBuilder`2.

Applies to

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<KafkaConsumerSettings>, Action<ConsumerBuilder<TKey,TValue>>)

Source:
AspireKafkaConsumerExtensions.cs
Source:
AspireKafkaConsumerExtensions.cs

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

public static void AddKeyedKafkaConsumer<TKey,TValue> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name, Action<Aspire.Confluent.Kafka.KafkaConsumerSettings>? configureSettings, Action<Confluent.Kafka.ConsumerBuilder<TKey,TValue>>? configureBuilder);
static member AddKeyedKafkaConsumer : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<Aspire.Confluent.Kafka.KafkaConsumerSettings> * Action<Confluent.Kafka.ConsumerBuilder<'Key, 'Value>> -> unit
<Extension()>
Public Sub AddKeyedKafkaConsumer(Of TKey, TValue) (builder As IHostApplicationBuilder, name As String, configureSettings As Action(Of KafkaConsumerSettings), configureBuilder As Action(Of ConsumerBuilder(Of TKey, TValue)))

Type Parameters

TKey
TValue

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
String

The name of the component, which is used as the ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section.

configureSettings
Action<KafkaConsumerSettings>

An optional method for customizing the KafkaConsumerSettings.

configureBuilder
Action<Confluent.Kafka.ConsumerBuilder<TKey,TValue>>

An optional method used for customizing the Confluent.Kafka.ConsumerBuilder`2.

Remarks

Reads the configuration from "Aspire:Kafka:Consumer:{name}" section.

Applies to

AddKeyedKafkaConsumer<TKey,TValue>(IHostApplicationBuilder, String, Action<KafkaConsumerSettings>, Action<IServiceProvider,ConsumerBuilder<TKey, TValue>>)

Source:
AspireKafkaConsumerExtensions.cs
Source:
AspireKafkaConsumerExtensions.cs

Registers Confluent.Kafka.IConsumer`2 as a keyed singleton for the given name in the services provided by the builder.

public static void AddKeyedKafkaConsumer<TKey,TValue> (this Microsoft.Extensions.Hosting.IHostApplicationBuilder builder, string name, Action<Aspire.Confluent.Kafka.KafkaConsumerSettings>? configureSettings, Action<IServiceProvider,Confluent.Kafka.ConsumerBuilder<TKey,TValue>>? configureBuilder);
static member AddKeyedKafkaConsumer : Microsoft.Extensions.Hosting.IHostApplicationBuilder * string * Action<Aspire.Confluent.Kafka.KafkaConsumerSettings> * Action<IServiceProvider, Confluent.Kafka.ConsumerBuilder<'Key, 'Value>> -> unit
<Extension()>
Public Sub AddKeyedKafkaConsumer(Of TKey, TValue) (builder As IHostApplicationBuilder, name As String, configureSettings As Action(Of KafkaConsumerSettings), configureBuilder As Action(Of IServiceProvider, ConsumerBuilder(Of TKey, TValue)))

Type Parameters

TKey
TValue

Parameters

builder
IHostApplicationBuilder

The IHostApplicationBuilder to read config from and add services to.

name
String

The name of the component, which is used as the ServiceKey of the service and also to retrieve the connection string from the ConnectionStrings configuration section.

configureSettings
Action<KafkaConsumerSettings>

An optional method for customizing the KafkaConsumerSettings.

configureBuilder
Action<IServiceProvider,Confluent.Kafka.ConsumerBuilder<TKey,TValue>>

An optional method used for customizing the Confluent.Kafka.ConsumerBuilder`2.

Remarks

Reads the configuration from "Aspire:Kafka:Consumer:{name}" section.

Applies to