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 #980

Merged
merged 1 commit into from May 25, 2022

Conversation

kozlovic
Copy link
Member

@kozlovic kozlovic commented May 25, 2022

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"`
}

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

@coveralls
Copy link

coveralls commented May 25, 2022

Coverage Status

Coverage remained the same at 83.873% when pulling 9aaf72b on js_stream_republish_and_cons_config_updates into 144a3b2 on main.

Copy link
Member

@wallyqs wallyqs left a comment

Choose a reason for hiding this comment

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

LGTM

js.go Outdated Show resolved Hide resolved
jsm.go Show resolved Hide resolved
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"`
}
```

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
@kozlovic kozlovic force-pushed the js_stream_republish_and_cons_config_updates branch from a789fa6 to 9aaf72b Compare May 25, 2022 01:42
@derekcollison derekcollison self-requested a review May 25, 2022 01:43
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 4e4f318 into main May 25, 2022
@kozlovic kozlovic deleted the js_stream_republish_and_cons_config_updates branch May 25, 2022 01:53
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.

None yet

4 participants