You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-13Lines changed: 40 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,26 +1,29 @@
1
-
# Tron eventsubscribe plugin
1
+
# Tron event subscribe plugin
2
2
3
-
This is an implementation of Tron eventsubscribe model.
3
+
This is an implementation of Tron event subscribe model.
4
4
5
5
***api** module defines IPluginEventListener, a protocol between Java-tron and event plugin.
6
6
***app** module is an example for loading plugin, developers could use it for debugging.
7
7
***kafkaplugin** module is the implementation for kafka, it implements IPluginEventListener, it receives events subscribed from Java-tron and relay events to kafka server.
8
8
***mongodbplugin** mongodbplugin module is the implementation for mongodb.
9
9
### Setup/Build
10
-
10
+
Event-plugin can be built with JDK 8 or JDK 17.
11
11
1. Clone the repo
12
12
2. Go to eventplugin `cd eventplugin`
13
13
3. run `./gradlew build`
14
14
15
15
* This will produce plugin zips, named `plugin-kafka-1.0.0.zip` and `plugin-mongodb-1.0.0.zip`, located in the `eventplugin/build/plugins/` directory.
16
16
17
17
18
-
### Edit **config.conf** of Java-tron, add the following fileds:
18
+
### Edit **config.conf** of Java-tron, add the following fields:
19
19
```
20
20
event.subscribe = {
21
21
path = "" // absolute path of plugin
22
22
server = "" // target server address to receive event triggers
23
-
dbconfig = "" // dbname|username|password, if you want to create indexes for collections when the collections are not exist, you can add version and set it to 2, as dbname|username|password|version
23
+
# dbname|username|password or dbname|username|password|version
24
+
# If you use version 2 and one collection not exists, it will create index automatically;
25
+
# In any other case, it will not create index, you must create index manually
26
+
dbconfig = ""
24
27
topics = [
25
28
{
26
29
triggerName = "block" // block trigger, the value can't be modified
@@ -95,13 +98,14 @@ event.subscribe = {
95
98
remove comment and set listeners=PLAINTEXT://:9092
96
99
remove comment and set advertised.listeners to PLAINTEXT://host_ip:9092
You can also create other indexes as necessary. See more details on [developers](https://developers.tron.network/docs/event-plugin-deployment-mongodb).
0 commit comments