Class SubjectNameStrategyExtensions
Extension methods for the SubjectNameStrategy type.
Inherited Members
Namespace: Confluent.SchemaRegistry
Assembly: Confluent.SchemaRegistry.dll
Syntax
public static class SubjectNameStrategyExtensions
Methods
ConstructKeySubjectName(SubjectNameStrategy, string, string)
Helper method to construct the key subject name given the specified parameters.
Declaration
[Obsolete("SubjectNameStrategy should now be specified via serializer configuration. This method will be removed in a future release.")]
public static string ConstructKeySubjectName(this SubjectNameStrategy strategy, string topic, string recordType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SubjectNameStrategy | strategy | |
| string | topic | |
| string | recordType |
Returns
| Type | Description |
|---|---|
| string |
ConstructValueSubjectName(SubjectNameStrategy, string, string)
Helper method to construct the value subject name given the specified parameters.
Declaration
[Obsolete("SubjectNameStrategy should now be specified via serializer configuration. This method will be removed in a future release.")]
public static string ConstructValueSubjectName(this SubjectNameStrategy strategy, string topic, string recordType = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SubjectNameStrategy | strategy | |
| string | topic | |
| string | recordType |
Returns
| Type | Description |
|---|---|
| string |
ToAsyncDelegate(SubjectNameStrategy, ISchemaRegistryClient, IEnumerable<KeyValuePair<string, string>>)
Provide an async functional implementation corresponding to the enum value.
Declaration
public static AsyncSubjectNameStrategyDelegate ToAsyncDelegate(this SubjectNameStrategy strategy, ISchemaRegistryClient schemaRegistryClient = null, IEnumerable<KeyValuePair<string, string>> config = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SubjectNameStrategy | strategy | The subject name strategy. |
| ISchemaRegistryClient | schemaRegistryClient | Optional. Required when strategy is Associated. The schema registry client to use for lookups. |
| IEnumerable<KeyValuePair<string, string>> | config | Optional. Used when strategy is Associated. The configuration. |
Returns
| Type | Description |
|---|---|
| AsyncSubjectNameStrategyDelegate | An AsyncSubjectNameStrategyDelegate. |
ToAsyncDelegate(SubjectNameStrategy, ISchemaRegistryClient, IEnumerable<KeyValuePair<string, string>>, out AssociatedNameStrategy)
EXPERIMENTAL: subject to change or removal.
Provide an async functional implementation corresponding to the enum value, additionally exposing the AssociatedNameStrategy instance backing it, if any.
The instance is needed to supply the Kafka cluster id resolver after construction - refer to SetClusterIdResolver(Func<Task<string>>).
Declaration
public static AsyncSubjectNameStrategyDelegate ToAsyncDelegate(this SubjectNameStrategy strategy, ISchemaRegistryClient schemaRegistryClient, IEnumerable<KeyValuePair<string, string>> config, out AssociatedNameStrategy associatedNameStrategy)
Parameters
| Type | Name | Description |
|---|---|---|
| SubjectNameStrategy | strategy | The subject name strategy. |
| ISchemaRegistryClient | schemaRegistryClient | Optional. Required when strategy is Associated. The schema registry client to use for lookups. |
| IEnumerable<KeyValuePair<string, string>> | config | Optional. Used when strategy is Associated. The configuration. |
| AssociatedNameStrategy | associatedNameStrategy | The strategy instance backing the returned delegate when
|
Returns
| Type | Description |
|---|---|
| AsyncSubjectNameStrategyDelegate | An AsyncSubjectNameStrategyDelegate. |
ToDelegate(SubjectNameStrategy)
Provide a functional implementation corresponding to the enum value.
Declaration
[Obsolete("Superseded by ToAsyncDelegate. This method cannot be used with SubjectNameStrategy.Associated.")]
public static SubjectNameStrategyDelegate ToDelegate(this SubjectNameStrategy strategy)
Parameters
| Type | Name | Description |
|---|---|---|
| SubjectNameStrategy | strategy | The subject name strategy. |
Returns
| Type | Description |
|---|---|
| SubjectNameStrategyDelegate | A SubjectNameStrategyDelegate. |