SubscribeRequest: Message<"virtufin.SubscribeRequest"> & {
    acceptBatches: boolean;
    announceLive: boolean;
    replayOnly: boolean;
    replaySince?: Timestamp;
    topics: string[];
}

Type declaration

  • acceptBatches: boolean

    Unset (the default): one response per event. Set: the events a publisher sent together with PublishEvents, which the gateway stores as one stream entry, arrive as one response with batch set instead of cloudevent; an event stored alone still arrives in cloudevent. Same events, same order. For a subscriber that takes events in bulk (the WorkManager Runtime): the gateway then forwards the stored bytes without reading the events. On a live call with replay_since every response stays a single event (a live event the replay already delivered is recognized by its id); with replay_only the retained entries arrive as stored.

    from field: bool accept_batches = 5;

  • announceLive: boolean

    Ask for a first response with live = true (no topic, no event) once every topic's subscription is registered, the moment the response headers are sent. For clients that cannot see headers before the first body bytes: Firefox resolves fetch() only then, so a browser over gRPC-Web learns that a quiet subscription is live only from this response. Ignored with replay_only.

    from field: bool announce_live = 4;

  • replayOnly: boolean

    With replay_since: deliver only the retained entries, then end the call (OK); no live subscription is opened. For a subscriber that already receives the topic live and needs only what it missed before (the WorkManager Runtime catching a moved worker up on its input topics). Without replay_since: INVALID_ARGUMENT.

    from field: bool replay_only = 3;

  • OptionalreplaySince?: Timestamp

    Unset (the default): the subscription starts at each topic's tail; what was published before it opened is not delivered. Set: before the live messages, every entry each topic's stream still retains from this time on (the stream's own clock) is delivered first, oldest first, and a live message already replayed is not delivered twice (matched by CloudEvent id). For low-rate topics that must not lose a message across a resubscription, such as a worker's command topic while the worker moves to another pod. Needs a pub/sub backend whose stream the gateway reads: pubsub.redis with PubsubRedisHost, or pubsub.jetstream with PubsubNatsUrl (FAILED_PRECONDITION otherwise); more retained entries than the gateway's PubsubReplayMaxEntries (default 10000), or more payload bytes than PubsubReplayMaxBytes (default 64 MiB), is OUT_OF_RANGE. Refusals come before the response headers.

    from field: google.protobuf.Timestamp replay_since = 2;

  • topics: string[]

    from field: repeated string topics = 1;

from message virtufin.SubscribeRequest