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

JetStream RePublish should work with SOURCES and MIRROR message ingest paths #4000

Closed
tbeets opened this issue Mar 29, 2023 · 0 comments
Closed
Assignees

Comments

@tbeets
Copy link
Contributor

tbeets commented Mar 29, 2023

A stream may ingest messages from subscription on one or more defined SUBJECT filters, but also may ingest messages replicated from an upstream via SOURCES or MIRROR configuration.

In the current release (2.9.x), if RePublish is configured on the stream, it acts only on ingested messages from SUBJECT filter(s). It would be desirable and useful for RePublish to work on any ingested message into the stream.

derekcollison added a commit that referenced this issue Apr 5, 2023
 - [X] Link to issue, e.g. `Resolves #NNN`
 - [ ] Documentation added (if applicable)
 - [ ] Tests added
- [X] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [X] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
 - [ ] Build is green in Travis CI
- [X] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)

Resolves #4000

### Changes proposed in this pull request:

Removes the check on the republish filter needing to have an overlap
with the listened subjects, as with the new stream subject
transformation changes we do not assume anymore that the subjects in a
stream must match the subjects being listened to.

This allows the use of republish for mirroring and/or sourcing streams
caspervonb pushed a commit to caspervonb/nats-server that referenced this issue Apr 5, 2023
 - [X] Link to issue, e.g. `Resolves #NNN`
 - [ ] Documentation added (if applicable)
 - [ ] Tests added
- [X] Branch rebased on top of current main (`git pull --rebase origin
main`)
- [X] Changes squashed to a single commit (described
[here](http://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
 - [ ] Build is green in Travis CI
- [X] You have certified that the contribution is your original work and
that you license the work to the project under the [Apache 2
license](https://github.com/nats-io/nats-server/blob/main/LICENSE)

Resolves nats-io#4000

### Changes proposed in this pull request:

Removes the check on the republish filter needing to have an overlap
with the listened subjects, as with the new stream subject
transformation changes we do not assume anymore that the subjects in a
stream must match the subjects being listened to.

This allows the use of republish for mirroring and/or sourcing streams
@jnmoyne jnmoyne closed this as completed Apr 6, 2023
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

No branches or pull requests

4 participants