Contents¶
EmbPublisher¶
This tool acts as a brokered publisher of message bus.
Telegaf’s message bus input plugin acts as a subscriber to the EII broker.
How to Integrate this Tool with Video or Time Series Use Case¶
In the
time-series.yml
/video-streaming.yml
file, add theZmqBroker
andtools/EmbPublisher
components.Use the modified
time-series.yml
/video-streaming.yml
file as an argument while generating the docker-compose.yml file using thebuilder.py
utility.Follow usual provisioning and starting process.
Configuration of the Tool¶
Let us look at the sample configuration:
{
"config": {
"pub_name": "TestPub",
"msg_file": "data1k.json",
"iteration": 10,
"interval": "5ms"
},
"interfaces": {
"Publishers": [
{
"Name": "TestPub",
"Type": "zmq_tcp",
"AllowedClients": [
"*"
],
"EndPoint": "ia_zmq_broker:60514",
"Topics": [
"topic-pfx1",
"topic-pfx2",
"topic-pfx3",
"topic-pfx4"
],
"BrokerAppName" : "ZmqBroker",
"brokered": true
}
]
}
}
-pub_name:The name of the publisher in the interface.
-topics:The name of the topics seperated by comma, for which the publisher need to be started.
-msg_file:The file containing the JSON data, which represents the single data point (files should be kept into directory named ‘datafiles’).
-num_itr:The number of iterations.
-int_btw_itr:The interval between any two iterations.
Running the EmbPublisher in IPC Mode¶
User needs to modify the following interface section of config.json(``[WORK_DIR]/IEdgeInsights/tools/EmbPublisher/config.json``) to run in IPC mode:
"interfaces": {
"Publishers": [
{
"Name": "TestPub",
"Type": "zmq_ipc",
"AllowedClients": [
"*"
],
"EndPoint": {
"SocketDir": "/EII/sockets",
"SocketFile": "frontend-socket"
},
"Topics": [
"topic-pfx1",
"topic-pfx2",
"topic-pfx3",
"topic-pfx4"
],
"BrokerAppName" : "ZmqBroker",
"brokered": true
}
]
}