Contents ======== * `Contents <#contents>`__ * `EmbPublisher <#embpublisher>`__ * `How to Integrate this Tool with Video or Time Series Use Case <#how-to-integrate-this-tool-with-videotime-series-use-case>`__ * `Configuration of the Tool <#configuration-of-the-tool>`__ * `Running the EmbPublisher in IPC Mode <#running-embpublisher-in-ipc-mode>`__ 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 the ``ZmqBroker`` and ``tools/EmbPublisher`` components. * Use the modified ``time-series.yml``\ /\ ``video-streaming.yml`` file as an argument while generating the docker-compose.yml file using the ``builder.py`` utility. * Follow usual provisioning and starting process. Configuration of the Tool ^^^^^^^^^^^^^^^^^^^^^^^^^ Let us look at the sample configuration: .. code-block:: sh { "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: .. code-block:: sh "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 } ] }