-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new CLI command to record messages from a message broker and write them to a file (or stdout). This was initially intended to be used to collect test fixtures, but can also be chained together with other commands using pipes. Messages are written as they arrive, one message per line, so it's easy to, say, run a command when a message arrives: $ fedora-messaging record - | while read -r line || -n $line; do echo "message received"; done or create a quick (and completely unreliable) bridge between brokers: $ fedora-messaging --conf=broker1.toml record - | \ fedora-messaging --conf=broker2.toml publish Signed-off-by: Sebastian Wojciechowski <s.wojciechowski89@gmail.com> [Rebase and refactor] Signed-off-by: Jeremy Cline <jcline@redhat.com>
- Loading branch information
1 parent
259fb15
commit e125de0
Showing
4 changed files
with
235 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
The ``fedora-messaging`` cli now has 2 new sub-commands: ``publish`` and ``record``. |