Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type ConsumerConfig struct {
BackOff []time.Duration `json:"backoff,omitempty"`
FilterSubject string `json:"filter_subject,omitempty"`
FilterSubjects []string `json:"filter_subjects,omitempty"`
ReplayPolicy ReplayPolicy `json:"replay_policy"`
ReplayPolicy ReplayPolicy `json:"replay_policy,omitempty"`
RateLimit uint64 `json:"rate_limit_bps,omitempty"` // Bits per sec
SampleFrequency string `json:"sample_freq,omitempty"`
MaxWaiting int `json:"max_waiting,omitempty"`
Expand Down
28 changes: 14 additions & 14 deletions server/stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ type StreamConfig struct {
Description string `json:"description,omitempty"`
Subjects []string `json:"subjects,omitempty"`
Retention RetentionPolicy `json:"retention"`
MaxConsumers int `json:"max_consumers"`
MaxMsgs int64 `json:"max_msgs"`
MaxBytes int64 `json:"max_bytes"`
MaxAge time.Duration `json:"max_age"`
MaxMsgsPer int64 `json:"max_msgs_per_subject"`
MaxConsumers int `json:"max_consumers,omitempty"`
MaxMsgs int64 `json:"max_msgs,omitempty"`
MaxBytes int64 `json:"max_bytes,omitempty"`
MaxAge time.Duration `json:"max_age,omitempty"`
MaxMsgsPer int64 `json:"max_msgs_per_subject,omitempty"`
MaxMsgSize int32 `json:"max_msg_size,omitempty"`
Discard DiscardPolicy `json:"discard"`
Storage StorageType `json:"storage"`
Expand All @@ -68,7 +68,7 @@ type StreamConfig struct {
Placement *Placement `json:"placement,omitempty"`
Mirror *StreamSource `json:"mirror,omitempty"`
Sources []*StreamSource `json:"sources,omitempty"`
Compression StoreCompression `json:"compression"`
Compression StoreCompression `json:"compression,omitempty"`
FirstSeq uint64 `json:"first_seq,omitempty"`

// Allow applying a subject transform to incoming messages before doing anything else
Expand All @@ -78,33 +78,33 @@ type StreamConfig struct {
RePublish *RePublish `json:"republish,omitempty"`

// Allow higher performance, direct access to get individual messages. E.g. KeyValue
AllowDirect bool `json:"allow_direct"`
AllowDirect bool `json:"allow_direct,omitempty"`
// Allow higher performance and unified direct access for mirrors as well.
MirrorDirect bool `json:"mirror_direct"`
MirrorDirect bool `json:"mirror_direct,omitempty"`

// Allow KV like semantics to also discard new on a per subject basis
DiscardNewPer bool `json:"discard_new_per_subject,omitempty"`

// Optional qualifiers. These can not be modified after set to true.

// Sealed will seal a stream so no messages can get out or in.
Sealed bool `json:"sealed"`
Sealed bool `json:"sealed,omitempty"`
// DenyDelete will restrict the ability to delete messages.
DenyDelete bool `json:"deny_delete"`
DenyDelete bool `json:"deny_delete,omitempty"`
// DenyPurge will restrict the ability to purge messages.
DenyPurge bool `json:"deny_purge"`
DenyPurge bool `json:"deny_purge,omitempty"`
// AllowRollup allows messages to be placed into the system and purge
// all older messages using a special msg header.
AllowRollup bool `json:"allow_rollup_hdrs"`
AllowRollup bool `json:"allow_rollup_hdrs,omitempty"`

// The following defaults will apply to consumers when created against
// this stream, unless overridden manually.
// TODO(nat): Can/should we name these better?
ConsumerLimits StreamConsumerLimits `json:"consumer_limits"`
ConsumerLimits StreamConsumerLimits `json:"consumer_limits,omitempty"`

// AllowMsgTTL allows header initiated per-message TTLs. If disabled,
// then the `NATS-TTL` header will be ignored.
AllowMsgTTL bool `json:"allow_msg_ttl"`
AllowMsgTTL bool `json:"allow_msg_ttl,omitempty"`

// SubjectDeleteMarkerTTL sets the TTL of delete marker messages left behind by
// subject delete markers.
Expand Down