AGENT SKILL

dubbo-admin 事件总线开发

dubbo-admin-events

实现和审查 dubbo-admin EventBus 事件分发。当用户询问 Event、Emitter、Subscriber、SubscriptionManager、EventBus 组件注册、Subscribe 或 Unsubscribe 行为、Send 分发规则、订阅者 ProcessEvent 流程、基于 resource-kind 的路由,或 pkg/core/events/ 下的事件错误处理时使用。除非任务会改变事件总线契约或分发语义,否则不用于领域订阅者。

License 许可
Apache-2.0
所属仓库
apache/dubbo-admin
最近更新
2026-11-14
Stars
★ 4.1k
Forks
2.2k

01 前言 Front Matter

name
dubbo-admin-events
description
Implements and reviews dubbo-admin EventBus dispatching. Use when the user asks about Event, Emitter, Subscriber, SubscriptionManager, EventBus component registration, Subscribe or Unsubscribe behavior, Send dispatch rules, subscriber ProcessEvent flow, resource-kind based routing, or event error handling under pkg/core/events/. Do not use for a domain subscriber unless the task changes the event bus contract or dispatch semantics.

02 资源文件 24

03 SKILL.md 正文

dubbo-admin Events

Purpose

Use this skill to modify or explain the shared EventBus contract used by discovery, engine, informers, and subscribers.

When to use

Use for EventBus interfaces, resource-kind dispatching, subscriber registration uniqueness, synchronous processing, and event dispatch error behavior.

Do not use for business logic inside a single subscriber unless EventBus semantics change.

Inputs

Required:

  • EventBus behavior, interface, or dispatch problem.
  • Event producer or subscriber involved.

Optional:

  • Event type.
  • Old and new resource objects.
  • Subscriber names for the same resource kind.

If missing, inspect pkg/core/events/eventbus.go and pkg/core/events/component.go first.

Workflow

  1. Read pkg/core/events/eventbus.go for Event, Emitter, Subscriber, SubscriptionManager, and EventBus interfaces.
  2. Read pkg/core/events/component.go for the concrete EventBus implementation.
  3. Trace producers that call events.NewResourceChangedEvent and Emitter.Send.
  4. Trace consumers implementing ResourceKind, Name, and ProcessEvent.
  5. Read references/eventbus-dispatch.md before changing dispatch semantics.

Output format

Return event source, resource kind, subscribers called, error behavior, changed files, and validation evidence.

Validation

  • Confirm Send uses NewObj() first and OldObj() for delete-like events.
  • Confirm subscriber names are unique per resource kind.
  • Confirm subscriber errors are logged and do not stop later subscribers.
  • Run tests or targeted reasoning for discovery and engine consumers when dispatch changes.

Edge cases

  • Events with both old and new nil cannot be routed.
  • Dispatch is synchronous; long subscriber work blocks the caller.
  • EventBus should stay domain-neutral; put business logic in subscribers.

References

  • Read references/eventbus-dispatch.md for concrete dispatch rules and failure behavior.

04 同仓库更多 Skills

apache
apache/dubbo-admin

dubbo-admin 资源存储与索引开发

dubbo-admin-store

实现和审查 dubbo-admin 资源存储与索引变更。当用户询问 ResourceStore API、store 路由、内存 store 行为、索引注册、IndexCondition、ListByIndexes、PageListByIndexes、ByMeshIndex、radix-tree(基数树)前缀查找,或 pkg/core/store/、pkg/core/store/index/ 和 pkg/store/ 时使用。除非需要改动 store 或索引,否则不用于前端、Console API、发现或引擎任务。

软件开发工程师代码实现
★ 4.1k
apache
apache/dubbo-admin

dubbo-admin 运行时组件开发

dubbo-admin-runtime

实现和审查 dubbo-admin 运行时组件变更。当用户询问组件抽象、组件组合、运行时 bootstrap、依赖顺序、注册、生命周期、启动、关闭、runtime builder 行为,或 pkg/core/runtime/ 和 pkg/core/bootstrap/ 时使用。除非组件生命周期或依赖关系受到影响,否则不用于发现、引擎、store、Console API 或前端任务。

软件开发工程师代码实现
★ 4.1k
apache
apache/dubbo-admin

dubbo-admin Vue3 前端开发

dubbo-admin-frontend

实现和审查 dubbo-admin Vue 3 前端变更。当用户询问 ui-vue3、Vue 视图或组件、前端路由、路由元数据、API 客户端、Pinia store、SearchDomain、i18n、布局标签页(layout tabs)、流量规则表单设计、前端测试,或 Vite、ESLint 和 Prettier 配置时使用。除非需要与前端协调 API 契约,否则不用于 Go 后端内部逻辑。

软件开发工程师前端开发与界面实现
★ 4.1k
apache
apache/dubbo-admin

dubbo-admin 资源引擎开发

dubbo-admin-engine

实现和审查 dubbo-admin 资源引擎变更。当用户询问运行时基础设施发现、引擎工厂、Kubernetes 或 mock 引擎的 ListWatchers、RuntimeInstance informers、RuntimeInstanceEventSubscriber、引擎 leader election(主节点选举),或将 RuntimeInstance 数据合并到 Instance 资源(相关功能位于 pkg/core/engine/ 和 pkg/engine/ 下)时使用。除非任务涉及引擎来源的 RuntimeInstance 资源,否则不用于注册发现。

软件开发工程师代码实现
★ 4.1k
apache
apache/dubbo-admin

dubbo-admin 架构问题路由

dubbo-admin-domain

将 dubbo-admin 架构问题路由到相应的领域技能。用于跨模块问题、端到端流程、子系统边界,或判断是否需要运行时(runtime)、服务发现(discovery)、引擎(engine)、事件(events)、存储(store)、Console API 或前端方面的指导。当请求明确针对某个子系统时,优先使用更具体的 dubbo-admin-* 技能。

系统架构师系统架构设计模式
★ 4.1k
apache
apache/dubbo-admin

dubbo-admin 注册发现实现与审查

dubbo-admin-discovery

实现并审查 dubbo-admin 的注册中心服务发现变更。当用户询问 Zookeeper 或 Nacos 服务发现、ListAndWatch、informers、discovery factories(发现工厂)、discovery subscribers(发现订阅者)、ServiceProviderMetadata 或 ServiceConsumerMetadata 处理,或 pkg/core/discovery/ 和 pkg/core/controller/ 下 Application、Service、RPCInstance 与 Instance 的派生逻辑时使用。不要用于引擎来源的 RuntimeInstance 行为。

软件开发工程师开发参考
★ 4.1k