Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion faust/agents/replies.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def _reply_topic(self, topic: str) -> TopicT:
return self.app.topic(
topic,
partitions=1,
replicas=0,
replicas=self.app.conf.topic_replication_factor,
deleting=True,
retention=self.app.conf.reply_expires,
value_type=ReqRepResponse,
Expand Down
7 changes: 6 additions & 1 deletion tests/unit/agents/test_replies.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,12 @@ def test_reply_topic(self, *, c, app):
topic = c._reply_topic("foo")
assert topic.get_topic_name() == "foo"
assert topic.partitions == 1
assert topic.replicas == 0
# Must not hardcode 0: most brokers reject a replication factor of
# 0 outright (InvalidReplicationFactorError, see
# faust-streaming/faust#76). Use the app's configured default
# instead, consistent with every other topic faust creates.
assert topic.replicas == app.conf.topic_replication_factor
assert topic.replicas > 0
assert topic.deleting
assert topic.retention == app.conf.reply_expires
assert topic.value_type is ReqRepResponse
Loading