Class SerdeExtensions
EXPERIMENTAL: subject to change or removal.
Extension methods that interrogate a serializer or deserializer for optional capabilities - IClusterIdAware and ISerdeDisposable - without requiring it to implement them.
Every method here is safe to call on any serializer or deserializer, including the built-in ones and application-supplied delegates: an instance that does not implement the relevant interface reports no capability and is left untouched.
An instance wrapped with AsSyncOverAsync() is unwrapped first, so
the capabilities of the underlying async serializer or deserializer are
the ones that count.
Inherited Members
Namespace: Confluent.Kafka
Assembly: Confluent.Kafka.dll
Syntax
public static class SerdeExtensions
Methods
DisposeOwnedResources<T>(IAsyncDeserializer<T>)
EXPERIMENTAL: subject to change or removal.
Release any resources deserializer created itself.
Resources supplied by the application are not released.
Declaration
public static void DisposeOwnedResources<T>(this IAsyncDeserializer<T> deserializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncDeserializer<T> | deserializer |
Type Parameters
| Name | Description |
|---|---|
| T |
DisposeOwnedResources<T>(IAsyncSerializer<T>)
EXPERIMENTAL: subject to change or removal.
Release any resources serializer created itself.
Resources supplied by the application are not released.
Declaration
public static void DisposeOwnedResources<T>(this IAsyncSerializer<T> serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncSerializer<T> | serializer |
Type Parameters
| Name | Description |
|---|---|
| T |
DisposeOwnedResources<T>(IDeserializer<T>)
EXPERIMENTAL: subject to change or removal.
Release any resources deserializer created itself.
Resources supplied by the application are not released.
Declaration
public static void DisposeOwnedResources<T>(this IDeserializer<T> deserializer)
Parameters
| Type | Name | Description |
|---|---|---|
| IDeserializer<T> | deserializer |
Type Parameters
| Name | Description |
|---|---|
| T |
DisposeOwnedResources<T>(ISerializer<T>)
EXPERIMENTAL: subject to change or removal.
Release any resources serializer created itself.
Resources supplied by the application are not released.
Declaration
public static void DisposeOwnedResources<T>(this ISerializer<T> serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| ISerializer<T> | serializer |
Type Parameters
| Name | Description |
|---|---|
| T |
SetClusterIdResolver<T>(IAsyncDeserializer<T>, Func<Task<string>>)
EXPERIMENTAL: subject to change or removal.
Supply a resolver for the id of the Kafka cluster the client is
connected to, if deserializer makes use of it.
Declaration
public static void SetClusterIdResolver<T>(this IAsyncDeserializer<T> deserializer, Func<Task<string>> clusterIdResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncDeserializer<T> | deserializer | |
| Func<Task<string>> | clusterIdResolver |
Type Parameters
| Name | Description |
|---|---|
| T |
SetClusterIdResolver<T>(IAsyncSerializer<T>, Func<Task<string>>)
EXPERIMENTAL: subject to change or removal.
Supply a resolver for the id of the Kafka cluster the client is
connected to, if serializer makes use of it.
Declaration
public static void SetClusterIdResolver<T>(this IAsyncSerializer<T> serializer, Func<Task<string>> clusterIdResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| IAsyncSerializer<T> | serializer | |
| Func<Task<string>> | clusterIdResolver |
Type Parameters
| Name | Description |
|---|---|
| T |
SetClusterIdResolver<T>(IDeserializer<T>, Func<Task<string>>)
EXPERIMENTAL: subject to change or removal.
Supply a resolver for the id of the Kafka cluster the client is
connected to, if deserializer makes use of it.
Declaration
public static void SetClusterIdResolver<T>(this IDeserializer<T> deserializer, Func<Task<string>> clusterIdResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| IDeserializer<T> | deserializer | |
| Func<Task<string>> | clusterIdResolver |
Type Parameters
| Name | Description |
|---|---|
| T |
SetClusterIdResolver<T>(ISerializer<T>, Func<Task<string>>)
EXPERIMENTAL: subject to change or removal.
Supply a resolver for the id of the Kafka cluster the client is
connected to, if serializer makes use of it.
Declaration
public static void SetClusterIdResolver<T>(this ISerializer<T> serializer, Func<Task<string>> clusterIdResolver)
Parameters
| Type | Name | Description |
|---|---|---|
| ISerializer<T> | serializer | |
| Func<Task<string>> | clusterIdResolver |
Type Parameters
| Name | Description |
|---|---|
| T |