Closed
Description
The problem
At the moment, published messages have always an empty key:
This prevents key-based retention via topic compaction:
https://developer.confluent.io/courses/architecture/compaction/#topic-compaction-key-based-retention
The solution
That would be a breaking change, but I think the MyApp.Outbox.publish/2
function should accept three arguments and become:
MyApp.Outbox.publish("topic", "key", %{hello: :kafka})
Similarly, the Kafkaesque.publish/4
function would become Kafkaesque.publish/5
and accept key
argument just before the payload
.
And the structure of Kafkaesque.Message
schema would be extended with the key
field.
@v0idpwn What do you think?
Metadata
Metadata
Assignees
Labels
No labels