ControlPlaneMessageBus
public final class ControlPlaneMessageBus implements MessageBus
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:44–289控制面消息总线,承载智能体的部署、调度与服务化运行。位于 io.agentscope.extensions.controlplane.store 包,实现 MessageBus。核心成员包括 queuePush、queueDrain、queueDelete、queuePeek、logAppend、logRead。
Control-plane hosted MessageBus over /api/v1/dp/bus/*.
Mode D (#publish/#subscribe) is implemented as a bounded replay log with a
2s client-side poll.
方法摘要Method Summary
方法详情Method Detail
queuePush
public Mono<String> queuePush(String key, Map<String, Object> payload)
执行队列推送相关操作。
Performs the queue push operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
payload | Map<String, Object> | 负载(类型 `Map`)。The payload. |
Mono<String>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:62–76queueDrain
public Mono<List<BusEntry>> queueDrain(String key, int maxCount)
执行 queueDrain 方法。
Performs the queue drain operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
maxCount | int | 最大数量(类型 `int`)。The max count. |
Mono<List<BusEntry>>返回Mono>。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:78–92queueDelete
public Mono<Void> queueDelete(String key)
设置队列删除。
Performs the queue delete operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
Mono<Void>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:94–119queuePeek
public Mono<Boolean> queuePeek(String key)
设置该参数。
Performs the queue peek operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
Mono<Boolean>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:121–136logAppend
public Mono<String> logAppend(String key, Map<String, Object> payload, int maxLen)
执行日志追加相关操作。
Performs the log append operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
payload | Map<String, Object> | 负载(类型 `Map`)。The payload. |
maxLen | int | 最大 Len(类型 `int`)。The max len. |
Mono<String>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:138–153logRead
public Mono<List<BusEntry>> logRead(String key, String since, int maxCount)
执行日志读取相关操作。
Performs the log read operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
since | String | since(类型 `String`)。The since. |
maxCount | int | 最大数量(类型 `int`)。The max count. |
Mono<List<BusEntry>>返回Mono>。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:155–176logTrim
public Mono<Void> logTrim(String key)
设置日志裁剪。
Performs the log trim operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
Mono<Void>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:178–203publish
public Mono<Void> publish(String key, Map<String, Object> payload)
执行发布相关操作。
Performs the publish operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
payload | Map<String, Object> | 负载(类型 `Map`)。The payload. |
Mono<Void>返回Mono。Returns mono.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:205–208subscribe
public Flux<Map<String, Object>> subscribe(String key)
设置订阅。
Performs the subscribe operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
key | String | 键(类型 `String`)。The key. |
Flux<Map<String, Object>>返回Flux>。Returns flux.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:210–230close
public void close()
关闭连接并释放相关资源。
Releases resources and connections.
源码Source
io/agentscope/extensions/controlplane/store/ControlPlaneMessageBus.java:232–235