Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The purpose
TOPIC_NOT_EXIST
(404) error.PENDING
subscriptions after creating the subscription are caused by the same problem.The problem
/hermes/groups
path/hermes/groups/{groupName}/topics
path/hermes/groups
,/hermes/groups/.../topics
paths when we connecting to the zookeeper for the first time (otherwise we could not fetch already existing zookeeper entries). Thus we don't have any refreshing mechanism in place.ConsumerProcess
instance.Analysis
gradle
module
field to the cache so it will be easily visible which module (consumers
/frontend
) is getting/missing notificationObservations
org.apache.zookeeper.ClientCnxn - Session establishment complete on server localhost/[0:0:0:0:0:0:0:1]:32803, session id = 0x10000040c290002, negotiated timeout = 60000
(this is ok)Got WatchedEvent state:SyncConnected type:NodeChildrenChanged path:/hermes/groups/TopicBuilderGroup1/topics zxid: -1 for session id 0x1000004d7030002
(this is ok)org.apache.zookeeper.ClientCnxn - Got ping response for session id: 0x1000004d7030000 after 0ms.
. The ping request/responses means that the connection is "alive" but there is no data sent from the server:The session is kept alive by requests sent by the client. If the session is idle for a period of time that would timeout the session, the client will send a PING request to keep the session alive. This PING request not only allows the ZooKeeper server to know that the client is still active, but it also allows the client to verify that its connection to the ZooKeeper server is still active. The timing of the PING is conservative enough to ensure reasonable time to detect a dead connection and reconnect to a new server.
.org.apache.zookeeper.ClientCnxn - Session establishment complete on server localhost/[0:0:0:0:0:0:0:1]:32803, session id = 0x10000040c290002, negotiated timeout = 60000
Got ping response for session id: 0x10000040c290002 after 1ms.
2024-11-25T12:38:14.0432627Z [Test worker-SendThread(localhost:32803)] - 2024-11-25 12:38:14.019 DEBUG org.apache.zookeeper.ClientCnxn - Got notification session id: 0x10000040c290002
2024-11-25T12:38:14.0436596Z [Test worker-SendThread(localhost:32803)] - 2024-11-25 12:38:14.019 DEBUG org.apache.zookeeper.ClientCnxn - Got WatchedEvent state:SyncConnected type:NodeChildrenChanged path:/hermes/groups zxid: -1 for session id 0x10000040c290002
DEBUG Accepted socket connection from /172.17.0.1:43038 (org.apache.zookeeper.server.NIOServerCnxnFactory)
. It is weird to not see such log because on the client side there is a clear evidence of connection establishment. Below are examples of broken and correct connection establishment process:Questions for further analysis
Accepted socket connection from
?sessionId
from zookeeper server, but the server does not accept the connection (does not log the new connections logs on its side)? Zookeeper code