Indexes 9: Adds messaging on package events to kafka#1356
Conversation
d93a1bd to
d7c1234
Compare
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
d2119c4 to
8566af4
Compare
…kafka Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
7d7001c to
e8a9444
Compare
| }) | ||
| .to_string(), | ||
| ), | ||
| Duration::from_secs(0), |
There was a problem hiding this comment.
This timeout is for waiting for room in the producer queue, it should be willing to wait some small amount of time as a form of back-pressure. Better to wait a little than fail aggressively.
There was a problem hiding this comment.
I've increased this to 4 seconds and made a constant for it for this PR. The next PR (#1363) adds another producer and its send call will need updating too, and at that point I think I'll make the value into a configuration setting.
… to 4 secs Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
|
|
||
| /// The queue timeout for a producer sending a message to a queue. | ||
| /// This determines how to long retry for if the producer queue is full. | ||
| const PRODUCER_QUEUE_TIMEOUT_S: u64 = 4; |
There was a problem hiding this comment.
| const PRODUCER_QUEUE_TIMEOUT_S: u64 = 4; | |
| const PRODUCER_QUEUE_TIMEOUT: Duration = Duration::from_secs(4); |
Safety via types.
There was a problem hiding this comment.
I've updated this, although it goes away in the next PR (#1363), when it turned into a config value.
Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
…afka (#1356) --------- Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
Implements downstream_build_requirements function for IndexedPackage. Adds messaging on package events and support for sending message to kafka (#1356) --------- Signed-off-by: David Gilligan-Cook <dcook@imageworks.com>
This adds configurable messaging support to
spkso it can send messages after events.This adds support for sending message to kafka when these events occur:
This allows a site to have an external messaging system listen for such messages and take appropriate action, e.g. updating the index on a repo after a new package has been published.
This is the 9th of the chained PRs for adding indexes to spk solves:
new_unchecked()constructors to spk schema objects #1337spk repo indexsubcommand for index generation and updates #1340version_filterfield in index schema #1344