Crates.io | amqp-client-cli |
lib.rs | amqp-client-cli |
version | 0.1.6 |
source | src |
created_at | 2022-03-25 04:56:17.74007 |
updated_at | 2022-09-22 03:42:09.27759 |
description | A CLI program for listening to messages on an AMQP Message bus |
homepage | |
repository | https://github.com/babinc/amqp-client-cli |
max_upload_size | |
id | 556057 |
size | 120,421 |
Why CLI and not GUI:
Why Rust:
If you have Cargo/Rust installed you can install the program with cargo using the command below:
cargo install amqp-client-cli
amqp-client-cli-0.1.6-setup.exe
sudo snap install amqp-client-cli
The program must have a valid configuration file in order to run.
Upon starting amqp-client-cli
will look in the following locations for a configuration file.
amqp-client-cli ~/projects/test.json
amqp-client-cli ./amqp-client-cli.json
/home/Carman/.config/amqp-client-cli.json
C:\Users\Carman\AppData\Roaming\amqp-client-cli.json
/Users/Carman/Library/Application Support/amqp-client-cli.json
/home/Carman/amqp-client-cli.json
C:\Users\Carman\amqp-client-cli.json
/Users/Carman/amqp-client-cli.json
{
"host": "127.0.0.1",
"port": 5672,
"username": "guest",
"password": "guest",
"pfx_path": null,
"pem_file": null,
"domain": "test-domain",
"items": [
{
"exchange_name": "test_program.incoming",
"exchange_type": "Topic",
"queue_routing_key": "*.*.*.*.#",
"alias": "Incoming",
"pretty": true,
"log_file": "/tmp/logs.txt"
},
{
"exchange_name": "test_program.logs",
"exchange_type": "Topic",
"queue_routing_key": "*.*.*.*.#",
"alias": "Logs",
"pretty": false,
"log_file": "/tmp/logs.txt"
},
{
"exchange_name": "test_program.trade",
"exchange_type": "Topic",
"queue_routing_key": "*.*.*.*.#",
"alias": "Trade",
"pretty": false,
"log_file": null
}
]
}
The user can set edit options for an exchange by pressing the E
key. Each exchange has its own set of options. Or the
user can set the options in the config file. When the program exits the options that were set while using the
program will be written to the configuration file.
While using the program the user can press the P
key to pause the program. Once the program is paused no more
messages will automatically appear in the Messages Window. Then the user can press the Up and Down arrow keys or the Page
Up and Page Down keys to scroll the text in the messages window.
The user can either set the logging parameter in the Configuration File or do it from within the program using the Options Window. Once a log file path is set the program will write out the messages for the exchange that it was set for to the file. The user can also add multiple exchanges to a single log file in order to log more than one exchange to a single file. Or you can log them into separate files. Logs are written to the file once every second.
amqp-client-cli leaves all existing queue's in place on the server. When subscribing to an exchange a new queue will be created, and when unsubscribing the newly created queue will be deleted.