Data protocol

The data protocol transmits messages from publishers to subscribers via a proxy server in a broadcasting fashion.

Transport layer

The transport layer ensures that a message arrives at its destination.

Socket configuration

A proxy server is the transmitting station, it shall offer an XSUBSCRIBER and an XPUBLISHER socket. The two sockets shall be connected, e.g. via the zmq.proxy_server method. Each of both sockets shall be bound to its own address.

A Publisher is a Component, which sends data messages via the data protocol. It shall have a PUBLISHER socket connecting to the proxy server’s XSUBSCRIBER socket.

A Subscriber is a Component, which wants to reveice data messages via the data protocol. It shall have a SUBSCRIBER socket connecting to the proxy server’s XPUBLISHER socket. It should subscribe to the Topics it wants to receive.

Note

Subscribing to a topic in zmq means to subscribe to all topics which start with the given topic name!

Message format

A Data Protocol Message consists in three or more frames (#62):

  1. Topic

  2. Header

  3. One or more data frames, the first one is the Content

Topic

The topic is the full name of the sending Component. (#60)

Content

Log message content

For log messages, the content is a JSON encoded list of:

  • record.asctime: Timestamp formatted as '%Y-%m-%d %H:%M:%S'

  • record.levelname: Logger level name

  • record.name: Logger name

  • record.text (including traceback)