-
Notifications
You must be signed in to change notification settings - Fork 920
Open
Labels
enhancementRequesting a feature changeRequesting a feature changepriority:lowMaintainer triage tag for indicating low impact or criticality issuesMaintainer triage tag for indicating low impact or criticality issuesstatus:help-wantedIssues that would especially appreciate external development or attentionIssues that would especially appreciate external development or attention
Description
Description
I had to write a class like the AggregateSerializer
below recently. It seems like something that would naturally be in the library given producers can produce to multiple topics and considers can subscribe to multiple topics (each with its own format).
How to implement
In /src/confluent_kafka/serialization/__init__.py
, two classes could be added:
class AggregateSerializer(Serializer):
def __init__(self, serializers: Dict[str, Serializer]):
self.serializers = serializers
def __call__(self, obj, ctx: SerializationContext):
return self.serializers[ctx.topic](obj. ctx)
# And basically the same for AggregateDeserializer
And basically the same for AggregateDeserializer
, plus doc comments per other classes in module.
I can do the legwork to integrate this if it increases the chances of it getting in.
Metadata
Metadata
Assignees
Labels
enhancementRequesting a feature changeRequesting a feature changepriority:lowMaintainer triage tag for indicating low impact or criticality issuesMaintainer triage tag for indicating low impact or criticality issuesstatus:help-wantedIssues that would especially appreciate external development or attentionIssues that would especially appreciate external development or attention