Skip to content

Instantly share code, notes, and snippets.

@ripienaar

ripienaar/1.md Secret

Last active January 31, 2024 21:33
Show Gist options
  • Save ripienaar/78666080a4296bc5a0e317d1c9c08df8 to your computer and use it in GitHub Desktop.
Save ripienaar/78666080a4296bc5a0e317d1c9c08df8 to your computer and use it in GitHub Desktop.
tracing

Message to interest stream with no consumers

[rip@p1-lon]% CONTEXT=sfo SUBJECT=js.in.interest.x ./bin/tracer
Trace on subject one > js.in.interest.x

Server n1-sfo (2.11.0-tracing2) on account one subject js.in.interest.x from Client connection 1249
==> n2-lon connection 650
    Server n2-lon (2.11.0-tracing2) on account one subject js.in.interest.x from Gateway connection 882
    --O Received by stream INTEREST on subject js.in.interest.x discarded due to no interest

Legend: Client --| Router: --> Gateway: ==> Leafnode: ~~> JetStream: --O

message to stream in other cluster

Trace on subject one > js.in.orders_0

Server n3-sfo (2.11.0-tracing2) on account one subject js.in.orders_0 from Client connection 865
==> n1-lon connection 641
    Server n1-lon (2.11.0-tracing2) on account one subject js.in.orders_0 from Gateway connection 747
    --O Received by stream ORDERS_0 on subject js.in.orders_0

Legend: Client --| Router: --> Gateway: ==> Leafnode: ~~> JetStream: --O Delivery Error: --X

Message to a subject with interest in a foreign cluster and in a foreign leafnode

Also showing relative timestamps

Trace on subject one > x

[+0s] Server n3-sfo (2.11.0-tracing2) on account one subject x from Client connection 878
[+0s] ==> Gateway n3-nyc connection 789
    [+35.928ms] Server n3-nyc (2.11.0-tracing2) on account one subject x from Gateway connection 670
    [+35.928ms] --| Client NATS CLI Version development connection 666 sub x
[+0s] ==> Gateway n1-lon connection 641
    [+76.42ms] Server n1-lon (2.11.0-tracing2) on account one subject x from Gateway connection 747
    [+76.42ms] ~~> Leafnode leaf1 connection 722
        [+818µs] Server leaf1 (2.11.0-tracing1) on account $G subject x from Leafnode connection 8
        [+818µs] --| Client NATS CLI Version development connection 5 sub x

Legend: Client --| Router: --> Gateway: ==> Leafnode: ~~> JetStream: --O Delivery Error: --X
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment