连接提示
在 Bolt 4.3 中引入
从 Bolt 版本 4.3 开始,服务器可以选择在对 HELLO
消息的响应中提供的 SUCCESS
元数据内包含一组配置提示。驱动程序可以选择自行决定解释或忽略这些提示。目前定义了以下提示集。
telemetry.enabled::布尔值
在 Bolt 5.4 中引入
是否通过 TELEMETRY
消息 启用遥测收集。
如果为 false
或不存在,驱动程序不应发送 TELEMETRY
消息。即使发送了这些消息,服务器也会忽略它们。
示例
C: HELLO {"user_agent": "Example/5.13.0", "scheme": "basic", "principal": "test", "credentials": "test"}
S: SUCCESS {"server": "Neo4j/5.13.0", "connection_id": "example-connection-id:1", "hints": {"telemetry.enabled": true}}
connection.recv_timeout_seconds::整数
在 Bolt 4.3 中引入
连接在请求后可能保持空闲的最大时间量(以秒为单位),在此之后驱动程序应将其视为陈旧。
服务器将确保至少每超时时间段传输一次块(或 NOOP
块)。选择解释此提示的驱动程序可以终止被此提示定义为陈旧的连接。
示例
C: HELLO {"user_agent": "Example/4.0.0", "scheme": "basic", "principal": "test", "credentials": "test"}
S: SUCCESS {"server": "Neo4j/4.3.0", "connection_id": "example-connection-id:1", "hints": {"connection.recv_timeout_seconds": 120}}