nats-io / nats.go

Golang client for NATS, the cloud native messaging system.
https://nats.io
Apache License 2.0
5.3k stars 672 forks source link

panic: interface conversion: jetstream.Consumer is nil, not *jetstream.pullConsumer #1656

Open zonque opened 2 weeks ago

zonque commented 2 weeks ago

Observed behavior

panic: interface conversion: jetstream.Consumer is nil, not *jetstream.pullConsumer
goroutine 57 [running]:
github.com/nats-io/nats.go/jetstream.(*orderedConsumer).reset(0x17929c0)
        github.com/nats-io/nats.go@v1.36.0/jetstream/ordered.go:542 +0x328
github.com/nats-io/nats.go/jetstream.(*orderedConsumer).Consume.func2()
        github.com/nats-io/nats.go@v1.36.0/jetstream/ordered.go:150 +0xc0
created by github.com/nats-io/nats.go/jetstream.(*orderedConsumer).Consume in goroutine 54
        github.com/nats-io/nats.go@v1.36.0/jetstream/ordered.go:146 +0x76c

Expected behavior

No panic.

Server and client version

Server version 2.10.16 Client version v1.36.0

Host environment

No response

Steps to reproduce

This happens randomly, cannot provide a good reproducer at this point. Will comment on this ticket when I do.

piotrpio commented 2 weeks ago

Hello @zonque, thank you for creating the issue, I'll try to reproduce as well and will come back to you when I have a fix.