https://github.com/devigned/testhub
Test CLI for Azure Event Hubs
https://github.com/devigned/testhub
Last synced: 10 months ago
JSON representation
Test CLI for Azure Event Hubs
- Host: GitHub
- URL: https://github.com/devigned/testhub
- Owner: devigned
- License: mit
- Created: 2018-03-30T15:13:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-06-06T17:18:13.000Z (almost 7 years ago)
- Last Synced: 2025-05-07T02:05:06.271Z (10 months ago)
- Language: Go
- Size: 83 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Hub Testing CLI
`testhub` is a command line tool to help test Event Hub sending and receiving.
### Usage
When simply executing `testhub`, you will be greeted with a help page. `help` can be called on each command.
```bash
$ testhub
hubtest is a simple command line testing tool for the Event Hub library
Usage:
hubtest [command]
Available Commands:
delete Delete an Event Hub
help Help about any command
receive Receive messages from an Event Hub
send Send messages to an Event Hub
version Print the git ref
Flags:
--conn-str string Connection string for Event Hub
--debug debug level logging
-h, --help help for hubtest
--hub string name of the Event Hub
--key string SAS key for the key-name
--key-name string SAS key name for the Event Hub
--namespace string namespace of the Event Hub
Use "hubtest [command] --help" for more information about a command.
```
#### Send
Send will by default send 1 messages of 256 bytes.
```bash
$ testhub send --namespace yourNamespace --hub yourHub --key-name yourKeyName --key yourKey
```
Send with a connection string.
```bash
$ testhub send --conn-str yourConnectionString
```
You can specify more messages by using `--msg-count` and `--msg-size`.
```bash
$ testhub send --conn-str yourConnectionString --msg-count 100 --msg-size 100
```
#### Receive
Listen for messages on all partitions of a given Event Hub.
```bash
$ testhub receive --namespace yourNamespace --hub yourHub --key-name yourKeyName --key yourKey
```
Use a connection string instead.
```bash
$ testhub receive --conn-str yourConnectionString
```
#### Debug
If you would like to see more in-depth information about what is happening, run the commands with `--debug`.