Skip to content

Commit

Permalink
fix issue with bi-directional messages
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrake committed Jan 3, 2024
1 parent 96ee533 commit 3333f31
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions bi-directional-sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,16 @@ func main() {
fmt.Println("Error leaf counting leaf stream messages after leaf server shut down: ", err)
}

// FIXME, for some reason we are getting 5 extra messages on the server that are not on the leaf node
msgs, err = getMessages(srv, "hub", "NODES-LEAF", 10)
if err != nil {
fmt.Println("Error hub counting leaf stream messages after leaf server shut down: ", err)
msgs.dump()
}

msgs, err = getMessages(srvLeaf, "leaf", "NODES-LEAF", 10)
if err != nil {
fmt.Println("Error leaf counting leaf stream messages after leaf server shut down: ", err)
}

msgs.dump()
msgs, err = getMessages(srv, "hub", "NODES-LEAF", 10)
if err != nil {
fmt.Println("Error hub counting leaf stream messages after leaf server shut down: ", err)
msgs.dump()
}
}

func heading(s string) {
Expand Down Expand Up @@ -333,12 +330,12 @@ func sourceStream(srv *server.Server, domain, stream, sourceDomain, subject stri
}

cfg := jetstream.StreamConfig{
Name: stream,
Subjects: []string{subject},
Name: stream,
Sources: []*jetstream.StreamSource{
{
Name: stream,
Domain: sourceDomain,
Name: stream,
Domain: sourceDomain,
FilterSubject: subject,
},
},
}
Expand Down

0 comments on commit 3333f31

Please sign in to comment.