From e71191bff710386dc305eca8faa4a37d9dc6a2db Mon Sep 17 00:00:00 2001 From: "P. Scott DeVos" Date: Sun, 26 Dec 2021 09:02:06 -0600 Subject: [PATCH] BUGFIX for issue 543 https://github.com/robinhood/faust/issues/543 Passes key_type to derive if key has "type" attribute. --- faust/streams.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/faust/streams.py b/faust/streams.py index db6a1ecc2..3f57d04a8 100644 --- a/faust/streams.py +++ b/faust/streams.py @@ -582,7 +582,12 @@ def get_key(withdrawal): suffix = f'-{name}-repartition' p = partitions if partitions else self.app.conf.topic_partitions channel = cast(ChannelT, self.channel).derive( - prefix=prefix, suffix=suffix, partitions=p, internal=True) + key_type=key.type if hasattr(key, 'type') else None, + prefix=prefix, + suffix=suffix, + partitions=p, + internal=True, + ) format_key = self._format_key channel_it = aiter(channel)