Skip to content

Commit 894804c

Browse files
authored
Update README.md
1 parent 635f038 commit 894804c

File tree

1 file changed

+46
-88
lines changed

1 file changed

+46
-88
lines changed

README.md

Lines changed: 46 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -67,48 +67,6 @@ This section of the guide will show you the steps to deploy EventMesh from [Loca
6767

6868
This section guides the launch of EventMesh according to the default configuration, if you need more detailed EventMesh deployment steps, please visit the [EventMesh official document](https://eventmesh.apache.org/docs/introduction).
6969

70-
### Deployment Event Store
71-
72-
> EventMesh supports [multiple Event Stores](https://eventmesh.apache.org/docs/roadmap#event-store-implementation-status), the default storage mode is `standalone`, and does not rely on other event stores as layers.
73-
74-
### Run EventMesh Runtime locally
75-
76-
#### 1. Download EventMesh
77-
78-
Download the latest version of the Binary Distribution from the [EventMesh Download](https://eventmesh.apache.org/download/) page and extract it:
79-
80-
```shell
81-
wget https://dlcdn.apache.org/eventmesh/1.10.0/apache-eventmesh-1.10.0-bin.tar.gz
82-
tar -xvzf apache-eventmesh-1.10.0-bin.tar.gz
83-
cd apache-eventmesh-1.10.0
84-
```
85-
86-
#### 2. Run EventMesh
87-
88-
Execute the `start.sh` script to start the EventMesh Runtime server.
89-
90-
```shell
91-
bash bin/start.sh
92-
```
93-
94-
View the output log:
95-
96-
```shell
97-
tail -n 50 -f logs/eventmesh.out
98-
```
99-
100-
When the log output shows server `state:RUNNING`, it means EventMesh Runtime has started successfully.
101-
102-
You can stop the run with the following command:
103-
104-
```shell
105-
bash bin/stop.sh
106-
```
107-
108-
When the script prints `shutdown server ok!`, it means EventMesh Runtime has stopped.
109-
110-
### Run EventMesh Runtime in Docker
111-
11270
#### 1. Pull EventMesh Image
11371

11472
Use the following command line to download the latest version of [EventMesh](https://hub.docker.com/r/apache/eventmesh):
@@ -117,67 +75,67 @@ Use the following command line to download the latest version of [EventMesh](htt
11775
sudo docker pull apache/eventmesh:latest
11876
```
11977

120-
#### 2. Run and Manage EventMesh Container
78+
#### 2. Run EventMesh Runtime
12179

12280
Use the following command to start the EventMesh container:
12381

12482
```shell
12583
sudo docker run -d --name eventmesh -p 10000:10000 -p 10105:10105 -p 10205:10205 -p 10106:10106 -t apache/eventmesh:latest
12684
```
127-
128-
129-
Enter the container:
130-
131-
```shell
132-
sudo docker exec -it eventmesh /bin/bash
133-
```
134-
135-
view the log:
136-
85+
#### 3. Creating Topics
86+
Creating a topic is the first step in using EventMesh. You need to send an HTTP POST request to create a topic.
87+
Example Request
13788
```shell
138-
cd logs
139-
tail -n 50 -f eventmesh.out
140-
```
141-
142-
### Run EventMesh Runtime in Kubernetes
143-
144-
#### 1. Deploy operator
145-
146-
Run the following commands(To delete a deployment, simply replace `deploy` with `undeploy`):
147-
148-
```shell
149-
$ cd eventmesh-operator && make deploy
89+
POST /eventmesh/topic/create HTTP/1.1
90+
Host: localhost:10105
91+
Content-Type: application/json
92+
93+
{
94+
"topic": "example-topic"
95+
}
15096
```
151-
152-
Run `kubectl get pods``kubectl get crd | grep eventmesh-operator.eventmesh`to see the status of the deployed eventmesh-operator.
97+
#### 4. Subscribing to Topics
98+
After creating a topic, you can subscribe to it to receive messages. EventMesh provides two subscription methods: local subscription and remote subscription.
15399

154100
```shell
155-
$ kubectl get pods
156-
NAME READY STATUS RESTARTS AGE
157-
eventmesh-operator-59c59f4f7b-nmmlm 1/1 Running 0 20s
158-
159-
$ kubectl get crd | grep eventmesh-operator.eventmesh
160-
connectors.eventmesh-operator.eventmesh 2024-01-10T02:40:27Z
161-
runtimes.eventmesh-operator.eventmesh 2024-01-10T02:40:27Z
101+
POST /eventmesh/subscribe/local HTTP/1.1
102+
Host: localhost:10105
103+
Content-Type: application/json
104+
{
105+
"url": "http://localhost:8080/callback",
106+
"consumerGroup": "example-consumer-group",
107+
"topic": [
108+
{
109+
"topic": "example-topic",
110+
"mode": "CLUSTERING",
111+
"type": "SYNC"
112+
}
113+
]
114+
}
162115
```
163-
164-
#### 2. Deploy EventMesh Runtime
165-
166-
Execute the following command to deploy runtime, connector-rocketmq (To delete, simply replace `create` with `delete`):
167-
116+
#### 5. Sending Messages
117+
EventMesh provides multiple message sending methods, including asynchronous sending, synchronous sending, and batch sending.
168118
```shell
169-
$ make create
119+
POST /eventmesh/publish HTTP/1.1
120+
Host: localhost:10105
121+
Content-Type: application/json
122+
eventmesh-message-topic: example-topic
123+
{
124+
"content": "Hello, EventMesh!"
125+
}
170126
```
171-
172-
Run `kubectl get pods` to see if the deployment was successful.
173-
127+
#### 6. Unsubscribing
128+
When you no longer need to receive messages for a topic, you can unsubscribe.
174129
```shell
175-
NAME READY STATUS RESTARTS AGE
176-
connector-rocketmq-0 1/1 Running 0 9s
177-
eventmesh-operator-59c59f4f7b-nmmlm 1/1 Running 0 3m12s
178-
eventmesh-runtime-0-a-0 1/1 Running 0 15s
130+
POST /eventmesh/unsubscribe/local HTTP/1.1
131+
Host: localhost:10105
132+
Content-Type: application/json
133+
{
134+
"url": "http://localhost:8080/callback",
135+
"consumerGroup": "example-consumer-group",
136+
"topics": ["example-topic"]
137+
}
179138
```
180-
181139
## Contributing
182140

183141
[![GitHub repo Good Issues for newbies](https://img.shields.io/github/issues/apache/eventmesh/good%20first%20issue?style=flat&logo=github&logoColor=green&label=Good%20First%20issues)](https://github.com/apache/eventmesh/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) [![GitHub Help Wanted issues](https://img.shields.io/github/issues/apache/eventmesh/help%20wanted?style=flat&logo=github&logoColor=b545d1&label=%22Help%20Wanted%22%20issues)](https://github.com/apache/eventmesh/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) [![GitHub Help Wanted PRs](https://img.shields.io/github/issues-pr/apache/eventmesh/help%20wanted?style=flat&logo=github&logoColor=b545d1&label=%22Help%20Wanted%22%20PRs)](https://github.com/apache/eventmesh/pulls?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) [![GitHub repo Issues](https://img.shields.io/github/issues/apache/eventmesh?style=flat&logo=github&logoColor=red&label=Issues)](https://github.com/apache/eventmesh/issues?q=is%3Aopen)

0 commit comments

Comments
 (0)