Skip to content

Document TimersRouter prefix semantics#19

Merged
lesnik512 merged 1 commit intomainfrom
b1-correlation-id-default-doc
May 4, 2026
Merged

Document TimersRouter prefix semantics#19
lesnik512 merged 1 commit intomainfrom
b1-correlation-id-default-doc

Conversation

@lesnik512
Copy link
Copy Markdown
Member

router.md showed TimersRouter(prefix="my-service:") in the first example without ever explaining what prefix does. This is the only mechanism for sharing one Redis between multiple services without key collision, so it warrants explicit coverage.

Add a "How prefix works" section that:

  • spells out that prefix is concatenated into each subscriber's and publisher's full topic, and shows the resulting Redis keys (timers_timeline:my-service:invoices etc.)
  • recommends per-service prefixes for shared-Redis isolation
  • explains that broker.publish / broker.cancel_timer / has_pending / get_pending_timers / cancel_all do not see the router's prefix — callers must pass the prefixed topic explicitly, or use a publisher scoped to the router (which applies the prefix automatically).

router.md showed `TimersRouter(prefix="my-service:")` in the first
example without ever explaining what `prefix` does. This is the only
mechanism for sharing one Redis between multiple services without key
collision, so it warrants explicit coverage.

Add a "How `prefix` works" section that:
- spells out that `prefix` is concatenated into each subscriber's and
  publisher's full topic, and shows the resulting Redis keys
  (`timers_timeline:my-service:invoices` etc.)
- recommends per-service prefixes for shared-Redis isolation
- explains that `broker.publish` / `broker.cancel_timer` / `has_pending`
  / `get_pending_timers` / `cancel_all` do *not* see the router's
  prefix — callers must pass the prefixed topic explicitly, or use a
  publisher scoped to the router (which applies the prefix
  automatically).
@lesnik512 lesnik512 self-assigned this May 4, 2026
@lesnik512 lesnik512 merged commit ee5adc3 into main May 4, 2026
3 checks passed
@lesnik512 lesnik512 deleted the b1-correlation-id-default-doc branch May 4, 2026 05:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant