Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow republish for mirroring/sourcing streams #4010

Merged
merged 1 commit into from Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 0 additions & 10 deletions server/stream.go
Expand Up @@ -1291,20 +1291,10 @@ func (s *Server) checkStreamCfg(config *StreamConfig, acc *Account) (StreamConfi
if cfg.RePublish != nil {
// Check to make sure source is a valid subset of the subjects we have.
// Also make sure it does not form a cycle.
var srcValid bool
// Empty same as all.
if cfg.RePublish.Source == _EMPTY_ {
cfg.RePublish.Source = fwcs
}
for _, subj := range cfg.Subjects {
derekcollison marked this conversation as resolved.
Show resolved Hide resolved
if SubjectsCollide(cfg.RePublish.Source, subj) {
srcValid = true
break
}
}
if !srcValid {
return StreamConfig{}, NewJSStreamInvalidConfigError(fmt.Errorf("stream configuration for republish source is not valid subset of subjects"))
}
var formsCycle bool
for _, subj := range cfg.Subjects {
if SubjectsCollide(cfg.RePublish.Destination, subj) {
Expand Down