Categorygithub.com/tommzn/hdb-message-client
repositorypackage
1.3.1
Repository: https://github.com/tommzn/hdb-message-client.git
Documentation: pkg.go.dev

# README

Go Reference GitHub go.mod Go version GitHub release (latest by date) Go Report Card Actions Status

HomeDashboard Message Client

Message client receives messages from given Kafka topics. Consumers, e.g. a renderer, can use this client to get latest or all messages.

Config

By config you can define Kafka servers and a queue to topic forwarding. If no topic is specified given queue name is taken.

kafka:
  servers: localhost
  poll_sleep: 1s
  fetch_timeout: 1s
  subsriptions:
    - topic: data.
      limit: "5"
      datasource: exchangerate

fetch_timeout

Timeout to fetch new messages. Client will pause message consumption if there're no new messages. Default is 3 seconds.

poll_sleep

If there're no new message client will pause message consumption for given time. Default is 10 minutes.

subsriptions

Defines topics you want to listen to. For HomeDashboard topics retrieved messages are converted to events. Target event will be defined by datasource. For available datasources see Datasources. Number of which will be hold in a stack can be defined by limit param, default is 1 message.

Links