Skip to content

Commit

Permalink
fix: publish broadcasts independently on local streams
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Nov 2, 2023
1 parent 7379c71 commit 9972f0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions broker/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,7 @@ func (b *Memory) HandleBroadcast(msg *common.StreamMessage) {
msg.Epoch = b.GetEpoch()
msg.Offset = offset

if b.tracker.Has(msg.Stream) {
b.broadcaster.Broadcast(msg)
}
b.broadcaster.Broadcast(msg)
}

func (b *Memory) HandleCommand(msg *common.RemoteCommandMessage) {
Expand Down
4 changes: 1 addition & 3 deletions broker/nats.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,9 +328,7 @@ func (n *NATS) HandleBroadcast(msg *common.StreamMessage) {
msg.Epoch = n.Epoch()
msg.Offset = offset

if n.tracker.Has(msg.Stream) {
n.broadcaster.Broadcast(msg)
}
n.broadcaster.Broadcast(msg)
}

func (n *NATS) HandleCommand(msg *common.RemoteCommandMessage) {
Expand Down

0 comments on commit 9972f0e

Please sign in to comment.