mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-01 03:03:10 -06:00
Preserve consumer after unsubscribe
This commit is contained in:
parent
555752482c
commit
a0116959c3
|
|
@ -76,14 +76,14 @@ func (r *Inputer) workerForRoom(roomID string) *worker {
|
|||
})
|
||||
w := v.(*worker)
|
||||
if !loaded {
|
||||
consumer := "DendriteRoomInputConsumerPull" + jetstream.Tokenise(w.roomID)
|
||||
sub, err := w.r.JetStream.PullSubscribe(
|
||||
jetstream.InputRoomEventSubj(w.roomID),
|
||||
"DendriteRoomInputConsumerPull"+jetstream.Tokenise(w.roomID),
|
||||
jetstream.InputRoomEventSubj(w.roomID), consumer,
|
||||
nats.ManualAck(),
|
||||
nats.DeliverAll(),
|
||||
nats.MaxAckPending(-1),
|
||||
nats.AckWait(MaximumMissingProcessingTime+(time.Second*10)),
|
||||
nats.BindStream(r.InputRoomEventTopic),
|
||||
nats.Bind(r.InputRoomEventTopic, consumer),
|
||||
)
|
||||
if err != nil {
|
||||
logrus.WithError(err).Errorf("Failed to subscribe to stream for room %q", w.roomID)
|
||||
|
|
|
|||
Loading…
Reference in a new issue