1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-24 08:52:15 +02:00
dockerfiles/benthos
2021-11-09 17:03:12 +08:00
..
data add benthos 2021-11-09 17:03:12 +08:00
docker-compose.yml add benthos 2021-11-09 17:03:12 +08:00
README.md add benthos 2021-11-09 17:03:12 +08:00

benthos

Benthos is a high performance and resilient stream processor, able to connect various sources and sinks in a range of brokering patterns and perform hydration, enrichments, transformations and filters on payloads.

docker-compose.yml

version: "3.8"
services:
  benthos:
    image: jeffail/benthos
    command: -c /etc/benthos/config.yaml
    ports:
      - "4195:4195"
    volumes:
      - ./data:/etc/benthos
    restart: unless-stopped

config.yaml

input:
  mqtt:
    urls:
      - tcp://broker.hivemq.com:1883
    topics:
      - easypi

pipeline:
  processors:
    - jq:
        query: .
    - http:
        url: https://httpbin.org/post

output:
  stdout:
    codec: lines

up and running

$ docker-compose up -d
$ docker-compose logs -f
$ mosquitto_pub -h broker.hivemq.com -p 1883 -t easypi -m '{"hello":"world"}'