nats.go: Callback not getting called when using encoded connection
Hi,
I have a problem with a QueueSubscribe
that is not triggering the callback for published events from another pod on kubernetes. This works totally fine on my local, but deployed on k8s is not working.
The strange thing is that this used to work on a different service that was replaced, the publishing service is the same but the subscribing service was replaced with a new one.
Upon investigatin on /connz
I found that the deaf
QueueSubscriber is receiving the bulk events
Initial state
{
"cid": 10,
"ip": "10.8.0.38",
"port": 39240,
"start": "2019-04-10T05:11:29.299050658Z",
"last_activity": "2019-04-10T05:11:29.301004541Z",
"uptime": "3s",
"idle": "3s",
"pending_bytes": 0,
"in_msgs": 0,
"out_msgs": 0,
"in_bytes": 0,
"out_bytes": 0,
"subscriptions": 2,
"lang": "go",
"version": "1.7.2"
}
Upon starting my kubernetes job that publishes many events
{
"cid": 10,
"ip": "10.8.0.38",
"port": 39240,
"start": "2019-04-10T05:11:29.299050658Z",
"last_activity": "2019-04-10T05:22:26.292019018Z",
"rtt": "495µs",
"uptime": "11m0s",
"idle": "3s",
"pending_bytes": 0,
"in_msgs": 0,
"out_msgs": 473,
"in_bytes": 0,
"out_bytes": 57549,
"subscriptions": 2,
"lang": "go",
"version": "1.7.2"
}
The way the subscription is started
_, err := natsCnx.QueueSubscribe("new_post", "job_workers", indexNewPost)
I tried changing the queue name.
After this activity, the callbacks for the 2 subscriptions on this service were never invoked.
My question is how to debug this? the subscriber seems to be received all the messages properly, so I doubt it’s gnats
, it’s just that the callbacks are not happening.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (7 by maintainers)
I replaced all the encoded connections across all my services and passed messages using protocol buffers, the problem is resolved.
Thanks for your time and effort.