Publish queue: one pull consumer per holder (H-A-483)

The two class consumers (live, again) could not order live before again
under every scheduling: the idle-dispatch row failed on the build node
after four review rounds. One consumer per learnt holder (publishes-<holder>)
gives items in order; a failed send is handed back with its pause, so an
item put meanwhile goes first by construction. The builder retires the
holder's class durables of the earlier release before making the one,
since a work queue refuses overlapping filters; their unacknowledged items
reach the one consumer. The gap read, the held again items and the live
in-flight check go.

Builds: design 47 H2 H-A-483, its addendum and second addendum, §793
This commit is contained in:
2026-11-22 18:20:06 +01:00
parent 1c0309df23
commit 915a54f136
3 changed files with 203 additions and 276 deletions
@@ -28,15 +28,15 @@ import (
"mesh-delivery-builder/internal/versions" "mesh-delivery-builder/internal/versions"
) )
// Design 47 H2 §793 (whole, against the bus): the builder's work queue publishes, its pull consumers made as it learns a holder. // Design 47 H2 §793 (whole, against the bus): the builder's work queue publishes, one pull consumer made as it learns a holder
// A live publish enqueued behind 100 again items while the builder was away is sent first; a dropped item is never sent, and // (H-A-483 and its addenda), the class durables of an earlier release retired. No item is lost, a failed send comes back after
// put again within the duplicates window is not stored; the move of the old state run twice puts each item once, and the // its pause behind an item put meanwhile, and a dropped item never comes back; 100 again items and a live one put while the
// builder removes the old state's bucket itself (H-A-461 (1)). The seat mesh-builds' verb publish-queue reads the stream: counts // builder was away are all sent, the dropped one never, and put again within the duplicates window it is not stored; the move
// per holder and class, the oldest and newest, the live item listed first (H-A-454). An idle dispatch sends a live item put // of the old state run twice puts each item once, and the builder removes the old state's bucket itself (H-A-461 (1)). The seat
// before an again one first, 50 rounds (H-A-473, third addendum). Then §796's tag at another commit, its // mesh-builds' verb publish-queue reads the stream: counts per holder and class, the oldest and newest, the live item listed
// reservation's version-reserved waited on by name (§821), and // first (H-A-454). Then §796's tag at another commit, its reservation's version-reserved waited on by name (§821), and §794's
// §794's backlog held six minutes, as steps (H-A-453 (3)). // backlog held six minutes, as steps (H-A-453 (3)).
func TestThePublishQueueSendsLiveFirstAndNeverADroppedItem(t *testing.T) { func TestThePublishQueueLosesNoItemAndNeverSendsADroppedItem(t *testing.T) {
b := startBed(t) b := startBed(t)
ctx := b.ctx ctx := b.ctx
// The stream as the manifest's old streams section declares it: the module's own, retention work-queue, duplicates 24 hours. // The stream as the manifest's old streams section declares it: the module's own, retention work-queue, duplicates 24 hours.
@@ -45,66 +45,153 @@ func TestThePublishQueueSendsLiveFirstAndNeverADroppedItem(t *testing.T) {
Retention: jetstream.WorkQueuePolicy, Discard: jetstream.DiscardNew, Duplicates: 24 * time.Hour, MaxAge: 7 * 24 * time.Hour}); err != nil { Retention: jetstream.WorkQueuePolicy, Discard: jetstream.DiscardNew, Duplicates: 24 * time.Hour, MaxAge: 7 * 24 * time.Hour}); err != nil {
t.Fatal(err) t.Fatal(err)
} }
// An idle dispatch (H-A-473, its third addendum): its two pulls wait; a live item put, then an again one, is sent live first; // One consumer per holder (H-A-483 and its addenda): the holder's class durables of an earlier release are retired, the item
// and an again item put after a live one, while the dispatch runs an again item put before both, is sent after the live one. // one of them held unacknowledged reaches the one consumer; no item is lost; a failed send comes back after its pause, and a
// Every time, 50 rounds, each a holder of its own. // live item put while it waits is sent before it returns; a dropped item never comes back.
sentOf := make(chan string, 8) t.Run("one consumer", func(t *testing.T) {
idle := &publishQueue{js: b.js, ackWait: time.Minute, logf: func(string, ...any) {}, binding: publishesOf("mesh-delivery-builder"), const holder, pause = "paused", 3 * time.Second // the pause is far longer than a send of an item put now
take: func(_ context.Context, m itemMsg) { bound := testbus.SetupBound(t)
var q versions.QueuedPublish kv := &itemKV{vals: map[string][]byte{}, revs: map[string]uint64{}}
_ = json.Unmarshal(m.Data(), &q) type send struct {
_ = m.Ack() module string
sentOf <- q.Module at time.Time
}} }
t.Run("idle dispatch", func(t *testing.T) { var mu sync.Mutex
roundBound := testbus.SetupBound(t) // the level's set-up share (MESH_TEST_LEVEL_BOUND), as the other whole tests published, failed := map[string]bool{}, map[string]bool{}
for r := range 50 { sentCh := make(chan send, 16)
holder := fmt.Sprintf("idle%d", r) items := &publishItems{reasks: func() jetstream.KeyValue { return kv }, set: publishSettings{Pause: pause, PauseMax: time.Minute, Tries: 5},
idle.learn(ctx, holder) now: time.Now, logf: t.Logf,
for _, class := range []string{versions.PublishClassLive, versions.PublishClassStart} { // both pulls stand waiting reserved: func(_ context.Context, m, v string) (versions.ReservedVersion, bool, error) {
c, err := b.js.Consumer(ctx, bind.Stream, publishesConsumer(holder, class)) mu.Lock()
if err != nil { defer mu.Unlock()
t.Fatal(err) return versions.ReservedVersion{Module: m, Version: v, Artifacts: map[string]string{m + ":a": "sha256:a"}, Published: map[string]bool{m + ":a": published[m]}, BuiltAt: time.Now()}, true, nil
},
send: func(_ context.Context, q versions.QueuedPublish) versions.SendFate {
sentCh <- send{q.Module, time.Now()}
mu.Lock()
defer mu.Unlock()
if (q.Module == "fail" || q.Module == "dropme") && !failed[q.Module] { // the first send of each fails
failed[q.Module] = true
return versions.SendFate{Failed: "the registry is down"}
} }
for { published[q.Module] = true
info, err := c.Info(ctx) return versions.SendFate{Sent: true}
if err != nil { }}
t.Fatal(err) pq := &publishQueue{js: b.js, ackWait: time.Minute, logf: t.Logf, take: items.take, binding: publishesOf("mesh-delivery-builder")}
} put := func(module, class string) {
if info.NumWaiting > 0 { q := versions.QueuedPublish{V: 1, Holder: holder, Module: module, Version: "0.1.0", Artifacts: map[string]string{module + ":a": "sha256:a"}, Class: class, Queued: time.Now()}
break data, _ := json.Marshal(q)
} if _, err := b.js.Publish(ctx, pq.subject(bind, q), data); err != nil {
t.Fatal(err)
}
}
hear := func() { // each publish sent is heard: its item acknowledged once it is held
mu.Lock()
var done []string
for m, ok := range published {
if ok {
done = append(done, m)
} }
} }
put := func(module, class string) { mu.Unlock()
q := versions.QueuedPublish{V: 1, Holder: holder, Module: module, Version: "0.1.0", Class: class, Queued: time.Now()} for _, m := range done {
data, _ := json.Marshal(q) items.heard(ctx, m, "0.1.0")
if _, err := b.js.Publish(ctx, idle.subject(bind, q), data); err != nil {
t.Fatal(err)
}
} }
sent := func(n int) []string { }
var order []string next := func() send {
for range n { t.Helper()
select { select {
case m := <-sentOf: case s := <-sentCh:
order = append(order, m) hear()
case <-time.After(roundBound): return s
t.Fatalf("round %d: sent %v of %d items", r, order, n) case <-time.After(bound):
} t.Fatal("no item was sent within the level's set-up share")
}
return order
} }
put("live", versions.PublishClassLive) return send{}
put("again", versions.PublishClassStart) }
if order := sent(2); order[0] != "live" { // The two class durables an earlier release made, the live one holding an item given and not acknowledged.
t.Errorf("round %d: an idle dispatch sent %v, want the live item put first sent first", r, order) for _, class := range []string{versions.PublishClassLive, versions.PublishClassStart} {
if _, err := b.js.CreateOrUpdateConsumer(ctx, bind.Stream, jetstream.ConsumerConfig{Durable: publishesConsumer(holder) + "-" + class,
FilterSubject: bind.Subject + ".publish." + holder + "." + class + ".>", AckPolicy: jetstream.AckExplicitPolicy, AckWait: time.Hour}); err != nil {
t.Fatal(err)
} }
put("before", versions.PublishClassStart) }
put("live2", versions.PublishClassLive) put("given", versions.PublishClassLive)
put("after", versions.PublishClassStart) old, err := b.js.Consumer(ctx, bind.Stream, publishesConsumer(holder)+"-"+versions.PublishClassLive)
if order := sent(3); slices.Index(order, "after") < slices.Index(order, "live2") { if err != nil {
t.Errorf("round %d: the dispatch sent %v, want the again item put after the live one sent after it", r, order) t.Fatal(err)
}
if m, err := old.Next(); err != nil {
t.Fatal(err)
} else if md, _ := m.Metadata(); md.NumDelivered != 1 {
t.Fatalf("the old live durable gave %+v", md)
}
pq.learn(ctx, holder)
stream, err := b.js.Stream(ctx, bind.Stream)
if err != nil {
t.Fatal(err)
}
var names []string
for n := range stream.ConsumerNames(ctx).Name() {
if strings.HasPrefix(n, publishesConsumer(holder)) {
names = append(names, n)
}
}
if !slices.Equal(names, []string{publishesConsumer(holder)}) {
t.Fatalf("the consumers of %s are %v, want only %s: the class durables retired", holder, names, publishesConsumer(holder))
}
if s := next(); s.module != "given" {
t.Fatalf("sent %s first, want the item the old durable held unacknowledged", s.module)
}
put("fail", versions.PublishClassStart)
put("dropme", versions.PublishClassStart)
var firstFail time.Time
for range 2 {
if s := next(); s.module == "fail" {
firstFail = s.at
}
}
put("live", versions.PublishClassLive) // put while both failed items wait out their pause
if s := next(); s.module != "live" {
t.Fatalf("sent %s, want the live item put while the failed ones wait their pause", s.module)
}
if answer, err := pq.drop(ctx, items, "dropme", "0.1.0", "op@node", "a test drops it"); err != nil {
t.Fatalf("drop: %v", err)
} else {
t.Log(answer)
}
if s := next(); s.module != "fail" || s.at.Sub(firstFail) < pause {
t.Fatalf("sent %s %s after the failed send, want fail again after its pause %s", s.module, s.at.Sub(firstFail), pause)
}
// Every item is acknowledged and the dropped one is gone: nothing is left to come back.
c, err := b.js.Consumer(ctx, bind.Stream, publishesConsumer(holder))
if err != nil {
t.Fatal(err)
}
st, err := b.js.Stream(ctx, bind.Stream)
if err != nil {
t.Fatal(err)
}
for deadline := time.Now().Add(bound); ; {
hear()
info, err := c.Info(ctx)
if err != nil {
t.Fatal(err)
}
sinfo, err := st.Info(ctx, jetstream.WithSubjectFilter(bind.Subject+".publish."+holder+".>"))
if err != nil {
t.Fatal(err)
}
if info.NumAckPending == 0 && info.NumPending == 0 && len(sinfo.State.Subjects) == 0 {
break
}
if time.Now().After(deadline) {
t.Fatalf("the queue of %s holds %v, its consumer %d pending and %d unacknowledged: want every item acknowledged and the dropped one gone", holder, sinfo.State.Subjects, info.NumPending, info.NumAckPending)
}
select {
case s := <-sentCh:
t.Fatalf("sent %s again, want nothing more", s.module)
case <-time.After(10 * time.Millisecond):
} }
} }
}) })
@@ -161,15 +248,7 @@ func TestThePublishQueueSendsLiveFirstAndNeverADroppedItem(t *testing.T) {
if err := pq.learnAll(ctx); err != nil { if err := pq.learnAll(ctx); err != nil {
t.Fatal(err) t.Fatal(err)
} }
select { for range 4 { // the items in flight: at most four held unacknowledged, their publish unheard
case first := <-sentCh:
if first != "live" {
t.Errorf("the first item sent is %s, want the live one, enqueued behind 100 again items", first)
}
case <-time.After(30 * time.Second):
t.Fatal("nothing was sent")
}
for range 4 { // the again items in flight: at most four held unacknowledged, their publish unheard
select { select {
case <-sentCh: case <-sentCh:
case <-time.After(30 * time.Second): case <-time.After(30 * time.Second):
@@ -531,9 +531,9 @@ func builtOf(all []versions.ReservedVersion) []versions.ReservedVersion {
// the manifest's old streams section with the work-queue retention, the module's own, consumed by the module's one process on the // the manifest's old streams section with the work-queue retention, the module's own, consumed by the module's one process on the
// module's account (H-A-464), which declares no bus and so is the stream's one reader by the module's shape; each item on // module's account (H-A-464), which declares no bus and so is the stream's one reader by the module's shape; each item on
// `mesh.stream.<module>.event.publish.<holder>.<class>.<module>.<version>` under the message id // `mesh.stream.<module>.event.publish.<holder>.<class>.<module>.<version>` under the message id
// `<holder>.<class>.<module>.<version>`. The builder makes the pull consumers at run time as it learns a holder, // `<holder>.<class>.<module>.<version>`. The builder makes one pull consumer at run time as it learns a holder,
// `publishes-<holder>-<class>`, with ack wait publish-pause-max, max ack pending four and max deliveries ten, and pulls the live // `publishes-<holder>`, with ack wait publish-pause-max, max ack pending four and max deliveries ten, and sends its items in the
// class first, at most four sends at once per holder. // order the consumer gives them, at most four at once per holder (H-A-483 and its addenda).
type publishQueue struct { type publishQueue struct {
js jetstream.JetStream js jetstream.JetStream
binding func() (publishesStream, error) binding func() (publishesStream, error)
@@ -555,16 +555,16 @@ func publishesOf(module string) func() (publishesStream, error) {
return func() (publishesStream, error) { return b, nil } return func() (publishesStream, error) { return b, nil }
} }
// The consumers' numbers (H-A-446 (2)): at most four sends in flight per holder and class, and ten deliveries, the work queue's // The consumer's numbers (H-A-446 (2)): at most four sends in flight per holder, and ten deliveries, the work queue's largest;
// largest; the builder ends an item at publish-tries anyway. // the builder ends an item at publish-tries anyway.
const ( const (
publishesMaxAckPending = versions.PublishSendsAtOnce publishesMaxAckPending = versions.PublishSendsAtOnce
publishesMaxDeliver = 10 publishesMaxDeliver = 10
) )
// publishesConsumer is the durable consumer of holder's items of class. // publishesConsumer is the one durable consumer of holder's items (H-A-483 addendum).
func publishesConsumer(holder, class string) string { func publishesConsumer(holder string) string {
return versions.PublishesLocal + "-" + holder + "-" + class return versions.PublishesLocal + "-" + holder
} }
// subject is the item's subject on the bus. // subject is the item's subject on the bus.
@@ -636,223 +636,71 @@ func (pq *publishQueue) learn(ctx context.Context, holder string) {
} }
} }
// pull makes holder's two consumers and dispatches their items, the live class first, at most four sends at once: an again item // pull makes holder's one consumer and dispatches its items (design 47 H2 §793, H-A-483 and its addenda): first it retires the
// is run only when no live one waits on the queue or is in flight to the dispatch (dispatch, H-A-473). // holder's class durables an earlier release made (`-live`, `-again`), whose filters a work queue refuses beside the one; their
// unacknowledged items stay on the queue and reach the one consumer.
func (pq *publishQueue) pull(ctx context.Context, holder string) error { func (pq *publishQueue) pull(ctx context.Context, holder string) error {
b, err := pq.binding() b, err := pq.binding()
if err != nil { if err != nil {
return err return err
} }
cons := map[string]jetstream.Consumer{} for _, class := range []string{versions.PublishClassLive, versions.PublishClassStart} {
for _, class := range []string{versions.PublishClassStart, versions.PublishClassLive} { old := publishesConsumer(holder) + "-" + class
c, err := pq.js.CreateOrUpdateConsumer(ctx, b.Stream, jetstream.ConsumerConfig{Durable: publishesConsumer(holder, class), err := pq.js.DeleteConsumer(ctx, b.Stream, old)
FilterSubject: b.Subject + ".publish." + versions.EscapeToken(holder) + "." + class + ".>", AckPolicy: jetstream.AckExplicitPolicy, switch {
AckWait: pq.ackWait, MaxAckPending: publishesMaxAckPending, MaxDeliver: publishesMaxDeliver}) case err == nil:
if err != nil { pq.logf("the consumer %s of an earlier release is removed: the publishes of %s have one consumer (H-A-483)", old, holder)
return fmt.Errorf("the consumer %s: %w", publishesConsumer(holder, class), err) case !errors.Is(err, jetstream.ErrConsumerNotFound):
return fmt.Errorf("the consumer %s of an earlier release is not removed: %w", old, err)
} }
cons[class] = c
} }
pq.logf("pulling the publishes of %s, the live first", holder) c, err := pq.js.CreateOrUpdateConsumer(ctx, b.Stream, jetstream.ConsumerConfig{Durable: publishesConsumer(holder),
go pq.dispatch(ctx, holder, cons[versions.PublishClassLive], cons[versions.PublishClassStart]) FilterSubject: b.Subject + ".publish." + versions.EscapeToken(holder) + ".>", AckPolicy: jetstream.AckExplicitPolicy,
AckWait: pq.ackWait, MaxAckPending: publishesMaxAckPending, MaxDeliver: publishesMaxDeliver})
if err != nil {
return fmt.Errorf("the consumer %s: %w", publishesConsumer(holder), err)
}
pq.logf("pulling the publishes of %s", holder)
go pq.dispatch(ctx, holder, c)
return nil return nil
} }
// dispatch runs the items of one holder, at most four at once, every live item before an again one (design 47 H2 §793, // dispatch runs the items of one holder in the order its one consumer gives them, at most four at once (design 47 H2 §793,
// H-A-473 and its third addendum): on every turn no live item is held it fetches live without waiting, up to its free slots, // H-A-483): each free slot takes the next item through a pull that waits, so an item put or handed back after its pause is
// and takes again items only when that fetch returned nothing. With again items held it fetches live once more; only when // received the moment the bus gives it; an item handed back reappears only after its pause, so an item put meanwhile goes
// that returns nothing are they run, and while the live pull waits only once the live consumer's delivered sequence is no // before it. A pull the bus refuses ends the dispatch, said; the holder is pulled again when an item of it is put.
// further than the live items received: a gap is a live item in flight to the waiting pull, and the again items wait until it func (pq *publishQueue) dispatch(ctx context.Context, holder string, c jetstream.Consumer) {
// arrives and runs. When neither holds an item, a pull of one item waits on each, the bus's only wake for an item put or
// delivered again. A pull the bus refuses ends the dispatch, said; the holder is pulled again when an item of it is put.
func (pq *publishQueue) dispatch(ctx context.Context, holder string, live, again jetstream.Consumer) {
sem := make(chan struct{}, versions.PublishSendsAtOnce) sem := make(chan struct{}, versions.PublishSendsAtOnce)
run := func(m jetstream.Msg) {
go func() {
defer func() { <-sem }()
pq.take(ctx, m)
}()
}
failed := func(err error) {
pq.logf("the publishes of %s are not pulled: %v; they are pulled when an item of it is put", holder, err)
pq.mu.Lock()
delete(pq.pulling, holder)
pq.mu.Unlock()
}
refused := func(err error) bool {
return err != nil && !errors.Is(err, jetstream.ErrNoMessages) && !errors.Is(err, nats.ErrTimeout) && ctx.Err() == nil
}
// received is the live consumer's highest delivery sequence the dispatch holds; it starts at what the consumer delivered
// before this dispatch, to pulls no longer there.
var received uint64
if info, err := live.Info(ctx); err != nil {
if refused(err) {
failed(err)
return
}
} else {
received = info.Delivered.Consumer
}
gotLive := func(ms ...jetstream.Msg) {
for _, m := range ms {
if md, err := m.Metadata(); err == nil && md.Sequence.Consumer > received {
received = md.Sequence.Consumer
}
}
}
inFlight := func() bool { // a live item delivered to the waiting pull and not yet received
info, err := live.Info(ctx)
if err != nil {
pq.logf("the publishes of %s: the live consumer cannot be read (%v); the again items wait for the live pull's answer", holder, err)
return true
}
return info.Delivered.Consumer > received
}
now := func(c jetstream.Consumer, n int) ([]jetstream.Msg, error) {
b, err := c.FetchNoWait(n)
if err != nil {
return nil, err
}
var got []jetstream.Msg
for m := range b.Messages() {
got = append(got, m)
}
return got, b.Error()
}
type waited struct {
m jetstream.Msg
err error
}
liveDone, againDone := make(chan waited, 1), make(chan waited, 1)
wait := func(c jetstream.Consumer, done chan<- waited) {
go func() {
var w waited
b, err := c.Fetch(1)
if err == nil {
for m := range b.Messages() {
w.m = m
}
err = b.Error()
}
w.err = err
done <- w
}()
}
var heldLive jetstream.Msg // a live item the waiting pull received
var heldAgain []jetstream.Msg // again items received, not yet run
var liveWaiting, againWaiting bool
heard := func(w waited, waiting *bool, keep func(jetstream.Msg)) bool {
*waiting = false
if refused(w.err) {
failed(w.err)
return false
}
if w.m != nil {
keep(w.m)
}
return true
}
keepLive := func(m jetstream.Msg) { gotLive(m); heldLive = m }
keepAgain := func(m jetstream.Msg) { heldAgain = append(heldAgain, m) }
for { for {
select { select {
case sem <- struct{}{}: case sem <- struct{}{}:
case <-ctx.Done(): case <-ctx.Done():
return return
} }
n := 1 var got jetstream.Msg
slots: b, err := c.Fetch(1)
for n < cap(sem) { if err == nil {
select { for m := range b.Messages() {
case sem <- struct{}{}: got = m
n++
default:
break slots
} }
err = b.Error()
} }
select { if err != nil && !errors.Is(err, jetstream.ErrNoMessages) && !errors.Is(err, nats.ErrTimeout) && ctx.Err() == nil {
case w := <-liveDone:
if !heard(w, &liveWaiting, keepLive) {
return
}
default:
}
select {
case w := <-againDone:
if !heard(w, &againWaiting, keepAgain) {
return
}
default:
}
var got []jetstream.Msg
held := false // again items held for a live item in flight
if heldLive != nil {
got, heldLive = []jetstream.Msg{heldLive}, nil
} else {
ms, err := now(live, n)
if refused(err) {
failed(err)
return
}
gotLive(ms...)
got = ms
}
if len(got) == 0 {
if len(heldAgain) == 0 && !againWaiting {
ms, err := now(again, n)
if refused(err) {
failed(err)
return
}
heldAgain = ms
}
if len(heldAgain) > 0 { // with the again items held, live once more: one put since the first fetch goes first
ms, err := now(live, n)
if refused(err) {
failed(err)
return
}
gotLive(ms...)
got = ms
}
switch {
case len(got) > 0 || len(heldAgain) == 0:
case liveWaiting && inFlight():
held = true
default:
k := min(n, len(heldAgain))
got, heldAgain = heldAgain[:k], heldAgain[k:]
}
}
for _, m := range got {
run(m)
}
for range n - len(got) {
<-sem <-sem
} pq.logf("the publishes of %s are not pulled: %v; they are pulled when an item of it is put", holder, err)
if len(got) > 0 { pq.mu.Lock()
continue delete(pq.pulling, holder)
} pq.mu.Unlock()
if !liveWaiting {
liveWaiting = true
wait(live, liveDone)
}
if !againWaiting && !held {
againWaiting = true
wait(again, againDone)
}
select {
case w := <-liveDone:
if !heard(w, &liveWaiting, keepLive) {
return
}
case w := <-againDone:
if !heard(w, &againWaiting, keepAgain) {
return
}
case <-ctx.Done():
return return
} }
if got == nil {
<-sem
continue
}
go func(m jetstream.Msg) {
defer func() { <-sem }()
pq.take(ctx, m)
}(got)
} }
} }
@@ -48,7 +48,7 @@ const (
VerbVersions = "versions" VerbVersions = "versions"
// PublishClassLive is the class of a publish whose build ended in this run, which a pipeline's build step waits on; // PublishClassLive is the class of a publish whose build ended in this run, which a pipeline's build step waits on;
// PublishClassStart that of a publish asked again at a start, of a build that ended before it. A holder's items are pulled // PublishClassStart that of a publish asked again at a start, of a build that ended before it. A holder's items are pulled
// live first, each class oldest first (design 47 H H-A-290 (1), H2 §793). // by its one consumer in the order they are put (design 47 H H-A-290 (1), H2 §793, H-A-483).
PublishClassLive = "live" PublishClassLive = "live"
PublishClassStart = "again" PublishClassStart = "again"
// PublishSendsAtOnce bounds the sends of one holder that run at once, its consumers' max ack pending (H-A-290 (3), §793). // PublishSendsAtOnce bounds the sends of one holder that run at once, its consumers' max ack pending (H-A-290 (3), §793).