From e15375ab1fc014c92695c720840211ea46c16202 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 4a2a6b5a0..d8dcde731 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)