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

[ADDED] Stream RePublish and some ConsumerConfig new fields #546

Merged
merged 1 commit into from
May 25, 2022

Conversation

kozlovic
Copy link
Member

Namely for pull consumers: ability to override the replica count or storage type:

// Generally inherited by parent stream and other markers, now can be configured directly.
Replicas int `json:"num_replicas"`
// Force memory storage.
MemoryStorage bool `json:"mem_storage,omitempty"`

For the stream, this new StreamConfig option:

// Allow republish of the message after being sequenced and stored.
RePublish *SubjectMapping `json:"republish,omitempty"`

Where SubjectMapping is:

// SubjectMapping allows a source subject to be mapped to a destination subject for republishing.
type SubjectMapping struct {
	Source      string `json:"src,omitempty"`
	Destination string `json:"dest"`
}

Note: Removed consumer config's MaxRequestMaxBytes that was added
in PR #543 until we settle how max_bytes in pull requests should behave
(both in client and server)

Signed-off-by: Ivan Kozlovic ivan@synadia.com

Namely for pull consumers: ability to override the replica count or storage type:
```
// Generally inherited by parent stream and other markers, now can be configured directly.
Replicas int `json:"num_replicas"`
// Force memory storage.
MemoryStorage bool `json:"mem_storage,omitempty"`
```

For the stream, this new StreamConfig option:
```
// Allow republish of the message after being sequenced and stored.
RePublish *SubjectMapping `json:"republish,omitempty"`
```
Where SubjectMapping is:
```
// SubjectMapping allows a source subject to be mapped to a destination subject for republishing.
type SubjectMapping struct {
	Source      string `json:"src,omitempty"`
	Destination string `json:"dest"`
}
```

Note: Removed consumer config's MaxRequestMaxBytes that was added
in PR #543 until we settle how max_bytes in pull requests should behave
(both in client and server)

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
Copy link
Member

@derekcollison derekcollison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kozlovic kozlovic merged commit 32111be into main May 25, 2022
@kozlovic kozlovic deleted the js_stream_republish_and_consumer_config_updates branch May 25, 2022 22:36
kozlovic added a commit that referenced this pull request Jul 22, 2022
Since this feature was not released, made the change to the name
of the structure and added the HeadersOnly boolean to be on-par
with the server.

Related to #546

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
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

Successfully merging this pull request may close these issues.

2 participants