Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions versioned_docs/version-v2.0.0/documentation-map.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ too.
- [Java client guide](feature/client-java.md) — the complete
`CloudEventsClient` / `A2AClient` API surface: builders, pub/sub patterns,
request-reply, transports, security, reliability, backends.
- [HTTP API](feature/http-api.md) — every traffic endpoint on port 8080:
- [HTTP API](feature/http-api.md) — every traffic endpoint on port 10105:
methods, request/response shapes, error codes.
- [Admin API](feature/admin-api.md) — the operational surface on port 8081,
- [Admin API](feature/admin-api.md) — the operational surface on port 10106,
including the fail-closed bearer-token guard.
- [Observability](feature/observability.md) — metrics (Prometheus + JSON),
traces, health checks, SLOs and alert rules.
Expand Down
28 changes: 14 additions & 14 deletions versioned_docs/version-v2.0.0/feature/a2a.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ The `A2AClient` provides a typed Java API for agent developers:

```java
A2AClient client = A2AClient.builder()
.gatewayUrl("http://localhost:10105")
.gatewayUrl("http://localhost:10108")
.namespace("global")
.agentName("my-agent")
.agentCard(card)
Expand Down Expand Up @@ -401,7 +401,7 @@ The A2A Gateway provides a REST API for external clients and non-Java agents.
#### 5.3.1 Submit Task (Sync)

```bash
curl -X POST 'http://localhost:10105/a2a/tasks?mode=sync' \
curl -X POST 'http://localhost:10108/a2a/tasks?mode=sync' \
-H 'Content-Type: application/json' \
-d '{"targetAgent":"weather-agent","message":"Beijing"}'
```
Expand All @@ -418,7 +418,7 @@ Response:
#### 5.3.2 Submit Task (Async)

```bash
curl -X POST 'http://localhost:10105/a2a/tasks?mode=async' \
curl -X POST 'http://localhost:10108/a2a/tasks?mode=async' \
-H 'Content-Type: application/json' \
-d '{"targetAgent":"weather-agent","message":"Shanghai"}'
```
Expand All @@ -435,7 +435,7 @@ Response (HTTP 202):
#### 5.3.3 SSE Stream

```bash
curl -N http://localhost:10105/a2a/tasks/task-a1b2c3d4/stream
curl -N http://localhost:10108/a2a/tasks/task-a1b2c3d4/stream
```

Response (`text/event-stream`):
Expand All @@ -450,14 +450,14 @@ data: {"taskId":"task-a1b2c3d4","state":"completed","data":"The weather in Beiji
#### 5.3.4 List Agents

```bash
curl http://localhost:10105/a2a/agents
curl http://localhost:10108/a2a/agents
```

### 5.4 A2AClient SDK (Java)

```java
A2AClient client = A2AClient.builder()
.gatewayUrl("http://localhost:10105")
.gatewayUrl("http://localhost:10108")
.namespace("global")
.agentName("my-agent")
.agentCard(card)
Expand Down Expand Up @@ -767,29 +767,29 @@ A2A Gateway 提供完整的 REST API,支持非 Java 客户端通过 HTTP 交

```bash
# 同步提交 task
curl -X POST 'http://localhost:10105/a2a/tasks?mode=sync' \
curl -X POST 'http://localhost:10108/a2a/tasks?mode=sync' \
-H 'Content-Type: application/json' \
-d '{"targetAgent":"weather-agent","message":"Beijing"}'

# 异步提交 task
curl -X POST 'http://localhost:10105/a2a/tasks?mode=async' \
curl -X POST 'http://localhost:10108/a2a/tasks?mode=async' \
-H 'Content-Type: application/json' \
-d '{"targetAgent":"weather-agent","message":"Shanghai"}'

# 查询状态
curl http://localhost:10105/a2a/tasks/{taskId}
curl http://localhost:10108/a2a/tasks/{taskId}

# 列出 tasks(支持 state/limit/offset)
curl 'http://localhost:10105/a2a/tasks?state=COMPLETED&limit=20&offset=0'
curl 'http://localhost:10108/a2a/tasks?state=COMPLETED&limit=20&offset=0'

# SSE 流式推送(含 heartbeat 保活)
curl -N http://localhost:10105/a2a/tasks/{taskId}/stream
curl -N http://localhost:10108/a2a/tasks/{taskId}/stream

# 健康检查
curl http://localhost:10105/a2a/health
curl http://localhost:10108/a2a/health

# 列出 agents
curl http://localhost:10105/a2a/agents
curl http://localhost:10108/a2a/agents
```

#### REST API 端点列表
Expand All @@ -812,7 +812,7 @@ curl http://localhost:10105/a2a/agents

```java
A2AClient client = A2AClient.builder()
.gatewayUrl("http://localhost:10105")
.gatewayUrl("http://localhost:10108")
.namespace("global")
.agentName("my-agent")
.agentCard(card)
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-v2.0.0/feature/admin-api.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Admin API Reference

**Audience:** operators and dashboards. Every endpoint below lives on the
**admin HTTP port (default 8081)**, served by `UniAdminServer` — a separate
**admin HTTP port (default 10106)**, served by `UniAdminServer` — a separate
server so management traffic never competes with data traffic.

---
Expand Down
26 changes: 13 additions & 13 deletions versioned_docs/version-v2.0.0/feature/client-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ A typical client looks like this:

```java
CloudEventsClient client = CloudEventsClient.builder()
.runtimeUrl("http://localhost:8080") // EventMesh Runtime HTTP endpoint
.runtimeUrl("http://localhost:10105") // EventMesh Runtime HTTP endpoint
.clientId("order-svc") // unique per JVM
.pollIntervalMs(500L) // long-poll cadence
.build();
Expand Down Expand Up @@ -120,10 +120,10 @@ org.apache.eventmesh.client.cloudevents.CloudEventsClient

```java
CloudEventsClient.builder()
.runtimeUrl("http://localhost:8080") // required — Runtime HTTP endpoint
.runtimeUrl("http://localhost:10105") // required — Runtime HTTP endpoint
.clientId("my-service") // required — unique per JVM
.pollIntervalMs(500L) // long-poll cadence (default: builder default)
.wsUrl("http://localhost:8082") // optional — required for subscribeWs
.wsUrl("http://localhost:10107") // optional — required for subscribeWs
.build();
```

Expand All @@ -138,7 +138,7 @@ Environment variables are honored via `System.getProperty` for tests:

```java
CloudEventsClient client = CloudEventsClient.builder()
.runtimeUrl(System.getProperty("eventmesh.runtime.url", "http://localhost:8080"))
.runtimeUrl(System.getProperty("eventmesh.runtime.url", "http://localhost:10105"))
.clientId("demo-" + System.currentTimeMillis())
.build();
```
Expand Down Expand Up @@ -224,9 +224,9 @@ only difference is the **push direction**.

| Transport | Endpoint | Push direction | Port |
| --- | --- | --- | --- |
| Long-poll | `POST /events/subscribe` | client-driven | Runtime HTTP port (default 8080) |
| SSE | `GET /events/stream` (text/event-stream) | server push | Runtime HTTP port (default 8080) |
| WebSocket | runtime WS endpoint | server push, bi-directional | Runtime WS port (default 8082, configurable) |
| Long-poll | `POST /events/subscribe` | client-driven | Runtime HTTP port (default 10105) |
| SSE | `GET /events/stream` (text/event-stream) | server push | Runtime HTTP port (default 10105) |
| WebSocket | runtime WS endpoint | server push, bi-directional | Runtime WS port (default 10107, configurable) |

WebSocket needs a separate port because the WS upgrade is a different protocol
negotiation than plain HTTP. The Runtime starts the WS server on its own port
Expand All @@ -239,8 +239,8 @@ client.subscribeSse("orders", "BROADCAST", event -> { /* server-push */ });

// WebSocket — separate port
CloudEventsClient wsClient = CloudEventsClient.builder()
.runtimeUrl("http://localhost:8080") // HTTP (publish / long-poll / SSE)
.wsUrl("http://localhost:8082") // WS push
.runtimeUrl("http://localhost:10105") // HTTP (publish / long-poll / SSE)
.wsUrl("http://localhost:10107") // WS push
.clientId("ws-sub").build();
wsClient.subscribeWs("orders", "BROADCAST", event -> { /* WS push */ });
```
Expand Down Expand Up @@ -298,7 +298,7 @@ chunks flowing back, multi-turn conversation context).

```java
CloudEventsClient client = CloudEventsClient.builder()
.runtimeUrl("http://localhost:8080").clientId("my-app").build();
.runtimeUrl("http://localhost:10105").clientId("my-app").build();

try (StreamingResponse r = client.streaming()
.openSession(OpenSession.builder().clientId(client.clientId()).build())
Expand Down Expand Up @@ -439,7 +439,7 @@ canceled`) on top of the same storage substrate. The client side is

```java
A2AClient client = A2AClient.builder()
.gatewayUrl("http://localhost:8080") // Runtime A2A gateway (port 8080 by default)
.gatewayUrl("http://localhost:10105") // Runtime A2A gateway (port 10105 by default)
.namespace("default")
.agentName("order-agent")
.heartbeatInterval(30_000L)
Expand Down Expand Up @@ -567,7 +567,7 @@ Plain-text Kafka clusters need none of these.
public class Demo {
public static void main(String[] args) throws Exception {
CloudEventsClient client = CloudEventsClient.builder()
.runtimeUrl(System.getProperty("eventmesh.runtime.url", "http://localhost:8080"))
.runtimeUrl(System.getProperty("eventmesh.runtime.url", "http://localhost:10105"))
.clientId("demo-" + System.currentTimeMillis())
.pollIntervalMs(500L)
.build();
Expand Down Expand Up @@ -616,7 +616,7 @@ The same `Demo` class runs unchanged on all three.
| Backend connection | Runtime startup log | `[storage] connected to <backend>` line; otherwise no subscriptions will fire |
| Security gate | Runtime response | `401` on first request → auth header missing; `429` → quota exhausted; `403` → ACL denied |
| Quota exhaustion | Runtime metrics | `eventmesh_security_gate_quota_*` per-tenant counters |
| Dead-letter inspection | admin HTTP (port 8081) | `GET /admin/dlq?topic=<topic>` |
| Dead-letter inspection | admin HTTP (port 10106) | `GET /admin/dlq?topic=<topic>` |
| A2A agent registry | `A2AClient.listAgents()` | Should return at least one `AgentCard` for `agentName` you registered |

See [docs/feature/deployment.md](deployment.md) for SLOs and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ CONNECTOR_OPTS="-Dconnector.class=org.apache.eventmesh.connector.kafka.source.Ka
bin/start-connector.sh
```

Common flags: `eventmesh.runtime.url` (default `http://localhost:8080`),
Common flags: `eventmesh.runtime.url` (default `http://localhost:10105`),
`connector.offset.mode` (`remote` | `rocksdb` | `inmemory`), and for multiple
connectors per process the numbered form `-Dconnector.1.class=...`,
`-Dconnector.2.class=...` (any `-Dconnector.N.*` key is passed through to the
Expand Down
14 changes: 7 additions & 7 deletions versioned_docs/version-v2.0.0/feature/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ distribution does not start the A2A listener.

| Port | Server | Notes |
| --- | --- | --- |
| 8080 | Traffic HTTP | `/events/*`, `/session/*`, `/agent/*`, legacy `/eventmesh/*` |
| 8081 | Admin HTTP | `/admin/*` + `/metrics` (Prometheus); token-guarded |
| 8082 | WebSocket *(opt-in)* | `-Deventmesh.ws.port=8082`; disabled by default |
| 10105 | Traffic HTTP | `/events/*`, `/session/*`, `/agent/*`, legacy `/eventmesh/*` |
| 10106 | Admin HTTP | `/admin/*` + `/metrics` (Prometheus); token-guarded |
| 10107 | WebSocket *(opt-in)* | `-Deventmesh.ws.port=10107`; disabled by default |

## Running

Expand All @@ -37,7 +37,7 @@ distribution does not start the A2A listener.
docker run -d --name eventmesh \
-e EVENTMESH_STORAGE_TYPE=kafka \
-e EVENTMESH_KAFKA_NAMESRV=YOUR_KAFKA:9092 \
-p 8080:8080 -p 8081:8081 \
-p 10105:10105 -p 10106:10106 \
apache/eventmesh:latest
```

Expand All @@ -62,7 +62,7 @@ onto `-D` system properties.
### Verify

```shell
curl http://localhost:8081/admin/health # {"status":"UP"}
curl http://localhost:10106/admin/health # {"status":"UP"}
```

## Kubernetes
Expand Down Expand Up @@ -95,7 +95,7 @@ Multi-instance coordination keys:
```properties
-Deventmesh.meta.type=nacos # cluster mode; currently: nacos
-Deventmesh.meta.addr=nacos:8848
-Deventmesh.instance.id=10.0.0.5:8080 # defaults to host:port
-Deventmesh.instance.id=10.0.0.5:10105 # defaults to host:port
-Deventmesh.offset.meta=true # opt-in remote offset tier (see below)
```

Expand All @@ -113,7 +113,7 @@ process** — `eventmesh-connector-runtime` — and talk to the runtime over
HTTP + CloudEvents:

```shell
docker run -e EVENTMESH_RUNTIME_URL=http://runtime:8080 eventmesh-connector:uni
docker run -e EVENTMESH_RUNTIME_URL=http://runtime:10105 eventmesh-connector:uni
```

Connector definitions are managed through `/admin/connectors` (CRUD) and
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-v2.0.0/feature/http-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

**Audience:** application developers integrating with the EventMesh traffic
port directly (any language, no SDK required). Every endpoint below lives on
the **traffic HTTP port (default 8080)** and is registered in
the **traffic HTTP port (default 10105)** and is registered in
`UniHttpServer`. The Java SDK wraps all of these — see the
[Java client guide](client-java.md).

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-v2.0.0/feature/observability.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Observability is **OpenTelemetry-first**: every metric is an OTel instrument
deployment configures (OTLP, Prometheus-via-OTel, …). For zero-dependency
scraping the admin server also mirrors the same counters:

- `GET /metrics` — Prometheus text exposition (port 8081)
- `GET /metrics` — Prometheus text exposition (port 10106)
- `GET /admin/metrics` — JSON snapshot

| Metric (Prometheus name) | Kind | Meaning |
Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v2.0.0/feature/pubsub.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ legacy MeshMessage / OpenMessaging formats are adapted onto the same frame.
Raw HTTP:

```shell
curl -X POST "http://localhost:8080/events/publish?topic=orders" \
curl -X POST "http://localhost:10105/events/publish?topic=orders" \
-H "Content-Type: application/cloudevents+json" \
-d '{ ... event above ... }'
```
Expand Down Expand Up @@ -69,10 +69,10 @@ mode**. There are **no consumer groups** — EventMesh tracks offsets per
(topic, clientId) itself.

```shell
curl -X POST http://localhost:8080/events/subscribe \
curl -X POST http://localhost:10105/events/subscribe \
-H "Content-Type: application/json" \
-d '{"clientId":"order-svc","topic":"orders","mode":"LOAD_BALANCE"}'
# → {"subscriptionId":"...", "instanceUrl":"http://10.0.0.5:8080"}
# → {"subscriptionId":"...", "instanceUrl":"http://10.0.0.5:10105"}
```

The response's `instanceUrl` is the instance the subscriber should pin
Expand Down Expand Up @@ -142,7 +142,7 @@ Keys live in `eventmesh-runtime/conf/eventmesh.properties`

| Key | Default | Effect |
| --- | --- | --- |
| `eventmesh.http.port` | `8080` | Traffic endpoints |
| `eventmesh.http.port` | `10105` | Traffic endpoints |
| `eventmesh.ws.port` | `-1` (off) | WebSocket push transport |
| `eventmesh.delivery.topology` | `LOCAL_STICKY_PULL` | Single- vs multi-instance polling (see [Control plane](control-plane.md)) |

Expand Down
16 changes: 8 additions & 8 deletions versioned_docs/version-v2.0.0/feature/streaming.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ long-poll, SSE, WebSocket, and the two streaming-session modes.

| Transport | Endpoint | Direction | Port | Best for |
| --- | --- | --- | --- | --- |
| **HTTP long-poll** | `GET /events/poll` | client-driven | 8080 | Batch consumers, scheduled jobs, serverless; NAT-friendly |
| **SSE** | `GET /events/stream` | server push (one-way) | 8080 | Browser/mobile push, dashboards, LLM token streams |
| **WebSocket** | WS upgrade on the dedicated port | server push, bi-directional | 8082 (opt-in) | Low-latency interactive clients |
| **HTTP long-poll** | `GET /events/poll` | client-driven | 10105 | Batch consumers, scheduled jobs, serverless; NAT-friendly |
| **SSE** | `GET /events/stream` | server push (one-way) | 10105 | Browser/mobile push, dashboards, LLM token streams |
| **WebSocket** | WS upgrade on the dedicated port | server push, bi-directional | 10107 (opt-in) | Low-latency interactive clients |

All three deliver identical CloudEvent payloads and share the same ACK /
retry / quota machinery — the only difference is the push direction.

## Long-poll

```shell
curl "http://localhost:8080/events/poll?clientId=order-svc&timeoutMs=30000"
curl "http://localhost:10105/events/poll?clientId=order-svc&timeoutMs=30000"
# → [{ "deliveryId": "...", "event": { ...CloudEvent... } }, ...]
```

Expand All @@ -31,7 +31,7 @@ Batches up to `max` (default 100) buffered events; blocks up to
## SSE

```shell
curl -N "http://localhost:8080/events/stream?clientId=order-svc" \
curl -N "http://localhost:10105/events/stream?clientId=order-svc" \
-H "Accept: text/event-stream"
```

Expand All @@ -42,15 +42,15 @@ frames as events arrive. Write failures nack the dispatcher immediately

## WebSocket

The WS server is a separate port (`-Deventmesh.ws.port=8082`, disabled by
The WS server is a separate port (`-Deventmesh.ws.port=10107`, disabled by
default) because the upgrade handshake is a different protocol negotiation.
The **client must configure `wsUrl` explicitly** — pointing it at the HTTP
port fails the handshake:

```java
CloudEventsClient wsClient = CloudEventsClient.builder()
.runtimeUrl("http://localhost:8080") // publish / long-poll / SSE
.wsUrl("http://localhost:8082") // WS push
.runtimeUrl("http://localhost:10105") // publish / long-poll / SSE
.wsUrl("http://localhost:10107") // WS push
.clientId("ws-sub").build();
wsClient.subscribeWs("orders", "BROADCAST", event -> { ... });
```
Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-v2.0.0/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ makes the rest of the properties possible:
```
┌─────────────────────────────┐
publishers / │ EventMesh Runtime(s) │ storage backend
subscribers ─HTTP─▶│ 8080 traffic 8081 admin │─WAL──▶ RocketMQ / Kafka
(SDK or curl) │ 8082 WebSocket (opt-in) │ (pluggable SPI)
subscribers ─HTTP─▶│ 10105 traffic 10106 admin │─WAL──▶ RocketMQ / Kafka
(SDK or curl) │ 10107 WebSocket (opt-in) │ (pluggable SPI)
└──────────────┬──────────────┘
│ meta (optional, multi-instance)
▼
Expand Down Expand Up @@ -91,10 +91,10 @@ makes the rest of the properties possible:
docker run -d --name eventmesh \
-e EVENTMESH_STORAGE_TYPE=kafka \
-e EVENTMESH_KAFKA_NAMESRV=YOUR_KAFKA:9092 \
-p 8080:8080 -p 8081:8081 \
-p 10105:10105 -p 10106:10106 \
apache/eventmesh:latest

curl -X POST "http://localhost:8080/events/publish?topic=hello" \
curl -X POST "http://localhost:10105/events/publish?topic=hello" \
-H "Content-Type: application/cloudevents+json" \
-d '{"specversion":"1.0","id":"1","source":"/demo","type":"demo.hello","data":"world"}'
```
Expand Down
Loading
Loading