一个瑞士军刀 CLI 工具,用于与 Kafka、RabbitMQ 和其他消息传递系统进行交互。
plumber is a CLI devtool for inspecting, piping, messaging and redirecting data in message systems like Kafka, RabbitMQ , GCP PubSub and many more. [1]
The tool enables you to:
plumber -h)[1] It's like curl for messaging systems.
Messaging systems are black boxes - gaining visibility into what is passing through them is an involved process that requires you to write brittle consumer code that you will eventually throw away.
plumber enables you to stop wasting time writing throw-away code - use it to
look into your queues and data streams, use it to connect disparate systems
together or use it for debugging your event driven systems.
$ brew tap streamdal/public
$ brew install plumber
Plumber is a single binary, to install you simply need to download it, give it executable permissions and call it from your shell. Here's an example set of commands to do this:
$ curl -L -o plumber https://github.com/streamdal/plumber/releases/latest/download/plumber-darwin
$ chmod +x plumber
$ mv plumber /usr/local/bin/plumber
❯ plumber write kafka --topics test --input foo
INFO[0000] Successfully wrote message to topic 'test' backend=kafka
INFO[0000] Successfully wrote '1' message(s) pkg=plumber
…
NOTE: Add -f to perform a continuous read (like tail -f)
Write multiple messages
NOTE: Multiple messages are separated by a newline.
$ cat mydata.txt
line1
line2
line3
$ cat mydata.txt | plumber write kafka --topics foo
INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
Write each element of a JSON array as a message
$ cat mydata.json
[{"key": "value1"},{"key": "value2"}]
$ cat mydata.json | plumber write kafka --topics foo --input-as-json-array
INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
INFO[0000] Successfully wrote message to topic 'foo' pkg=kafka/write.go
A full list of available flags can be displayed by using the --help flag after
different parts of the command:
$ plumber --help
$ plumber read --help
$ plumber read kafka --help
--continuous support (ie. tail -f)We are distributed system enthusiasts that started a company called Streamdal.
Our company focuses on solving data stream observability for complex systems and workflows. Our goal is to allow everyone to build asynchronous systems, without the fear of introducing too much complexity.
While working on our company, we built a tool for reading and writing messages from our messaging systems and realized that there is a serious lack of tooling in this space.
We wanted a swiss army knife type of tool for working with messaging systems
(we use Kafka and RabbitMQ internally), so we created plumber.
plumber?We consider ourselves "internet plumbers" of sort - so the name seemed to fit :)
NOTE: If your messaging tech is not supported - submit an issue and we'll do our best to make it happen!
You need to ensure that you are using the same consumer group on all plumber instances.
Make sure that all instances of plumber are pointed to the same queue.
In order to flip a boolean flag to false, prepend --no to the flag.
ie. --queue-declare is true by default. To make it false, use --no-queue-declare.
plumber can now act as a replay destination (tunnel). Tunnel mode allows you to
run an instance of plumber, on your local network, which will then be available
in the Streamdal platform as a replay destination.
This mitigates the need make firewall changes to replay messages from a Streamdal collection back to your message bus.
See https://docs.streamdal.com/what-are/what-are-destinations/plumber-as-a-destination for full documentation.
plumber comes with a "server" mode which will cause plumber to operate as a
highly available cluster.
You can read more about "server mode" here.
Server mode examples can be found in docs/server.md
Huge shoutout to jhump and for his excellent
protoreflect library, without which
plumber would not be anywhere near as easy to implement. Thank you!
To push a new plumber release:
git tag v0.18.0 mastergit push origin v0.18.0We love contributions! Prior to sending us a PR, open an issue to discuss what you intend to work on. When ready to open PR - add good tests and let's get this thing merged! For further guidance check out our contributing guide.
暂无开放 Issues,或尚未同步最近议题。