add more config to stream
This commit is contained in:
parent
a78a78fffa
commit
27a0bb627d
|
@ -25,6 +25,11 @@ func AddStream(name string, subjects []string) error {
|
||||||
_, err := natsJS.AddStream(&nats.StreamConfig{
|
_, err := natsJS.AddStream(&nats.StreamConfig{
|
||||||
Name: name,
|
Name: name,
|
||||||
Subjects: subjectNames,
|
Subjects: subjectNames,
|
||||||
|
Retention: nats.WorkQueuePolicy,
|
||||||
|
MaxConsumers: -1,
|
||||||
|
MaxMsgSize: -1,
|
||||||
|
MaxMsgs: -1,
|
||||||
|
NoAck: false,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := fmt.Sprintf("add stream error: %s", err.Error())
|
msg := fmt.Sprintf("add stream error: %s", err.Error())
|
||||||
|
|
Loading…
Reference in New Issue