You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We often experience slow consumers in our real-time system based on NATS. It is useful if the service would be able to detect itself as a slow consumer.
According to nats_admin/slow_consumers, there is a way to detect slow consumers with the NATS client on Go. The same feature is not implemented for the NATS client on Node.js.
Could you implement slow consumer detection in the Nats.js?
The text was updated successfully, but these errors were encountered:
@alphara this is a good idea. The javascript clients are more prone to this type of problem as they have a single thread to process inbound/outbound and user code.
@alphara trying to study how to reflect this - effectively if you are using callbacks, the messages are in the execution path of the socket read - the data read from the socket is parsed, and as parsed, it invokes subscriptions - there's no buffering here, on the particular data read from the network gets processed. If you are using iterators, that is a different story, because function that feeds messages into an iterator, buffer, so at that point it is possible to determine if there are messages pending. The subscription's getPending() actually has an approximation of how many messages have queued up for the subscription.
We often experience slow consumers in our real-time system based on NATS. It is useful if the service would be able to detect itself as a slow consumer.
According to nats_admin/slow_consumers, there is a way to detect slow consumers with the NATS client on Go. The same feature is not implemented for the NATS client on Node.js.
Could you implement slow consumer detection in the Nats.js?
The text was updated successfully, but these errors were encountered: