Skip to content

Commit 8a0fc0f

Browse files
authored
Update README.md
1 parent e9b3f39 commit 8a0fc0f

File tree

1 file changed

+20
-4
lines changed

1 file changed

+20
-4
lines changed

README.md

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ This is an implementation of Tron eventsubscribe model.
1818
### Edit **config.conf** of Java-tron, add the following fileds:
1919
```
2020
event.subscribe = {
21-
path = "/Users/tron/sourcecode/eventplugin/build/plugins/plugin-kafka-1.0.0.zip"
22-
server = "127.0.0.1:9092"
21+
path = "" // absolute path of plugin
22+
server = "" // target server address to receive event triggers
23+
dbconfig="" // dbname|username|password
2324
topics = [
2425
{
25-
triggerName = "block"
26+
triggerName = "block" // block trigger, the value can't be modified
2627
enable = false
27-
topic = "block"
28+
topic = "block" // plugin topic, the value could be modified
2829
},
2930
{
3031
triggerName = "transaction"
@@ -42,15 +43,30 @@ event.subscribe = {
4243
topic = "contractlog"
4344
}
4445
]
46+
47+
filter = {
48+
fromblock = "" // the value could be "", "earliest" or a specified block number as the beginning of the queried range
49+
toblock = "" // the value could be "", "latest" or a specified block number as end of the queried range
50+
contractAddress = [
51+
"" // contract address you want to subscribe, if it's set to "", you will receive contract logs/events with any contract address.
52+
]
53+
54+
contractTopic = [
55+
"" // contract topic you want to subscribe, if it's set to "", you will receive contract logs/events with any contract topic.
56+
]
57+
}
4558
}
4659
60+
4761
```
4862
* **path**: is the absolute path of "plugin-kafka-1.0.0.zip"
4963
* **server**: Kafka server address
5064
* **topics**: each event type maps to one Kafka topic, we support four event types subscribing, block, transaction, contractlog and contractevent.
65+
* **dbconfig**: db configuration information for mongodb, if using kafka, delete this one; if using Mongodb, add like that dbname|username|password
5166
* **triggerName**: the trigger type, the value can't be modified.
5267
* **enable**: plugin can receive nothing if the value is false.
5368
* **topic**: the value is the kafka topic to receive events. Make sure it has been created and Kafka process is running
69+
* **filter**: filter condition for process trigger.
5470
**note**: if the server is not 127.0.0.1, pls set some properties in config/server.properties file
5571
remove comment and set listeners=PLAINTEXT://:9092
5672
remove comment and set advertised.listeners to PLAINTEXT://host_ip:9092

0 commit comments

Comments
 (0)