{
"senders": [ -> JSON array containing configuration of multiple receivers
{
"license": "n5NkzaEOALzvGs7LOExyAulYdqo8X+5==", -> License key
"name": "Sender 01", -> Sender identification
"source": { -> Source receiver definition
"receiver": "Receiver 01", -> Identification of associated receiver
"inputMode": "SINGLE", -> Data input mode (see Enumerations below)
"httpClientConfig": { -> Optional Vert.x HttpClientOptions for HttpClient (see receiver's configuration)
"keepAlive": true, -> Set whether keep alive is enabled
"pipelining": false, -> Set whether pipe-lining is enabled
"ssl": true, -> Set whether SSL/TLS is enabled
"trustAll": true, -> Set whether all server certificates should be trusted
"maxPoolSize": 25, -> Set the maximum pool size for connections
"idleTimeout": 3, -> Set the idle timeout, in seconds (zero means don't timeout)
"connectTimeout": 5000, -> Set the connect timeout, in milliseconds
"maxWaitQueueSize": -1 -> Set the maximum requests allowed in the wait queue (-1 means unbounded)
... -> Other: http://vertx.io/docs/apidocs/io/vertx/core/http/HttpClientOptions.html
},
"auth": {
"enabled": true, -> Flag indicating if Basic authentication is configured on receiver
"username": "editor", -> Username (see receiver's configuration)
"password": "BellaDati01", -> Plain text password (see receiver's configuration)
}
},
"host": "localhost", -> HTTP host on which HTTP endpoints are running
"port": 8101, -> HTTP port on which HTTP endpoints are running
"bodyLimit": 2097152, -> Maximum allowed request body size (in bytes, default: 2 MB)
"period": 60, -> Delay (in seconds) after which the timer will fire new send event
"startId": -1, -> Start ID that is used as a filter to obtain data from receiver (HSQL iterates from 0)
"limit": 1000, -> Page size that is used as a filter to obtain data from receiver
"saveToFile": true, -> Deprecated - use actions instead. Flag indicating if transformed data should be saved to local file
"sendToBellaDati": true, -> Deprecated - use actions instead. Flag indicating if transformed data should be send to BellaDati
"deleteProcessed": true, -> Flag indicating if processed data should be deleted from receiver database
"actions" : [ "BELLADATI_REST", "EMAIL" ], -> Specifies the sender type. Available types: BELLADATI_REST, HTTP_REQUEST, MQTT_PUBLISH, EMAIL, SAVE_TO_FILE;
"belladati": { -> BellaDati configuration
"url": "http://localhost:8081/", -> BellaDati URL
"useSsl": false, -> Flag indicating if BellaDati is running on SSL port
"consumerKey": "apiKey", -> OAuth consumer key
"consumerSecret": "apiSecret", -> OAuth consumer secret
"username": "dadmin01", -> BellaDati username
"password": "BellaDati01", -> BellaDati password
"dataSet": { -> DataSet configuration
"id": "123", -> DataSet identification
"columnId": "M_ID", -> Code of attribute/indicator that contains record identification
"columnReceiver": "L_RECEIVER", -> Code of attribute/indicator that contains receiver identification
"columnJson": "L_JSON", -> Code of attribute/indicator that contains JSON data
"columnTimestamp": "L_TIMESTAMP", -> Code of attribute/indicator that contains timestamp
"jsonMapping": "M_IND1=ind1_json,L_ATTR1=attr1_json", -> List of mappings between BellaDati indicator/attribute code and JSON key
"templateId": 12345, -> Identification of import template
"splitByColumn": 4 -> Index of column used to split data
},
"continueOnError" : false
},
"httpRequest" : {
"url" : "http://host",
"method" : "POST"|"GET"|"DELETE"|"PUT",
"headers" : "header1=value1,header2=value2",
"auth" : {
"type" : "BASIC", -> Auth type: BASIC, DIGEST, OAUTH
"useSsl": false, -> Flag indicating if BellaDati is running on SSL port
"consumerKey": "apiKey", -> OAuth consumer key
"consumerSecret": "apiSecret", -> OAuth consumer secret
"username": "dadmin01", -> BellaDati username
"password": "BellaDati01" -> BellaDati password
},
"continueOnError" : false,
"content" : "Message content with variables" -> It's possible to reference any of fields received from receiver
},
"mqttPublish" : {
"host" : "host",
"port" : 1833,
"topic" : "topic/to/publish/to",
"qos" : "AT_LEAST_ONCE", -> Quality of service AT_LEAST_ONCE, AT_MOST_ONCE, EXACTLY_ONCE, FAILURE
"auth" : {
"type" : "BASIC", -> Auth type: BASIC, DIGEST, CLIENT_CERT
"useSsl": false, -> Flag indicating if BellaDati is running on SSL port
"keystorePath": "/path/to/server-keystore.jks", -> Absolute path to Java keystore file (JKS)
"keystorePassword": "wibble", -> Password of Java keystore
"clientCert": "certName", -> OAuth consumer key
"username": "dadmin01", -> BellaDati username
"password": "BellaDati01" -> BellaDati password
},
"content" : "Message content with variables", -> It's possible to reference any of fields received from receiver
"continueOnError" : false,
"options" : {
"receiveBufferSize" : 123456, -> Set the TCP receive buffer size
"timeoutOnConnect" : 120, -> Set the timeout on CONNECT packet
"maxMessageSize" : -1, -> Set max MQTT message size
"autoClientId" : false, -> Set if clientid should be auto-generated when it's "zero-bytes"
"tcpNoDelay" : false, -> Set whether TCP no delay is enabled
"tcpKeepAlive" : false, -> Set whether TCP keep alive is enabled
"soLinger" : false,
"tcpQuickAck" : false,
"tcpFastOpen" : false,
"tcpCork" : false,
"acceptBacklog" : false,
"useAlpn" : false,
"clientAuth" : false,
"logActivity" : false,
"trafficClass" : -1,
"idleTimeout" : -1,
"sendBufferSize" : -1,
"usePooledBuffers" : false,
"clientAuthRequired" : false,
"enabledSecureTransportProtocols" : false
}
},
"email" : {
"host" : "smtp_host",
"port" : 25,
"auth" : {
"useSsl": false, -> Flag indicating if SMTP is running on SSL port
"username": "dadmin01", -> SMTP username
"password": "BellaDati01" -> SMTP password
},
"sender" : "sender@email.com",
"subject" : "Subject of the email", -> It's possible to reference any of fields received from receiver
"content" : "Message content with variables", -> It's possible to reference any of fields received from receiver
"continueOnError" : false
},
"actionRules" : {
"field1": {
"op": "EQ",
"value": "Slovakia"
},
"field2": {
"op": "IN",
"values": [ "Type 1", "Type 2", "Type 3" ]
},
"field3": {
"op": "NOT_NULL"
},
"field4": {
"op": "GT",
"value" : 1200
}
}
"db": { -> Database configuration
"url": "jdbc:hsqldb:file:/path/to/my-sender01-db;shutdown=true", -> Database connection string
"user": "SA", -> Database username
"password": "", -> Database password
"driverclass": "org.hsqldb.jdbcDriver", -> Database JDBC driver class (see dependencies in pom.xml)
"max_pool_size": 100, -> Database maximum pool size
"drop": true -> Flag indicating if database should be dropped during module startup
},
"auth": {
"enabled": true, -> Flag indicating if authentication is enabled
"drop": false, -> Flag indicating if users should be dropped during module startup
"merge": true, -> Flag indicating if users should be merged during module startup
"users": [ -> Array of users to merge (insert new or update existing)
{
"username": "viewer", -> Unique username
"password": "DAAF8173380C604B392A1EF8D7559AA0", -> Hashed password if 'salt' is defined, otherwise plain text password
"salt": "BA1170DE9ADE8D29D2C18FD789EAB3BD", -> Salt used to hash password
"roles": [ "VIEWER" ] -> Array of user roles (see Enumerations below)
}
]
},
"ssl": {
"enabled": true, -> Flag indicating if HTTP server should run with enabled SSL/TLS
"keystorePath": "/path/to/server-keystore.jks", -> Absolute path to Java keystore file (JKS)
"keystorePassword": "wibble" -> Password of Java keystore
}
},
{
"name": "sender02",
...
}
]
} |