Grants: say each consumer it creates, and once each it cannot create: which bookmarks exist was readable only on the bus

This commit is contained in:
2026-11-14 20:24:10 +01:00
parent ddee3bf9af
commit 4ee5b45cb8
@@ -190,11 +190,21 @@ func (p *Part) consumers(res *Result, recs buscompose.Records, match string) {
switch err := p.Consumers.CreateConsumer(stream, buscompose.ConsumerConfig(c)); {
case err == nil:
st.Created = append(st.Created, key)
if p.Logf != nil {
p.Logf("consumer %s created", key)
}
p.say(res, EventAsserted, map[string]any{"consumer": c.Name, "stream": stream})
case errors.Is(err, ErrHeld):
default:
st.Missing = append(st.Missing, key)
st.NotCreated = append(st.NotCreated, key+": "+err.Error())
if p.Logf != nil && p.filterRefused[key] != "create: "+err.Error() {
p.Logf("consumer %s is not created: %v", key, err)
if p.filterRefused == nil {
p.filterRefused = map[string]string{}
}
p.filterRefused[key] = "create: " + err.Error()
}
}
}
}