@@ -18,13 +18,14 @@ This is an implementation of Tron eventsubscribe model.
18
18
### Edit ** config.conf** of Java-tron, add the following fileds:
19
19
```
20
20
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
23
24
topics = [
24
25
{
25
- triggerName = "block"
26
+ triggerName = "block" // block trigger, the value can't be modified
26
27
enable = false
27
- topic = "block"
28
+ topic = "block" // plugin topic, the value could be modified
28
29
},
29
30
{
30
31
triggerName = "transaction"
@@ -42,15 +43,30 @@ event.subscribe = {
42
43
topic = "contractlog"
43
44
}
44
45
]
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
+ }
45
58
}
46
59
60
+
47
61
```
48
62
* ** path** : is the absolute path of "plugin-kafka-1.0.0.zip"
49
63
* ** server** : Kafka server address
50
64
* ** 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
51
66
* ** triggerName** : the trigger type, the value can't be modified.
52
67
* ** enable** : plugin can receive nothing if the value is false.
53
68
* ** 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.
54
70
** note** : if the server is not 127.0.0.1, pls set some properties in config/server.properties file
55
71
remove comment and set listeners=PLAINTEXT://:9092
56
72
remove comment and set advertised.listeners to PLAINTEXT://host_ip:9092
0 commit comments