1.2.0 • Published 8 months ago

eventhub-consumer v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

eventhub-consumer

Browse your Azure Event Hub events with a terminal-based UI.

Why a terminal?

Azure requires different auth strategies depending on what kind of software is requesting access. A terminal requires less up front requirements than a web app - allowing you to peruse events faster.

CLI

Targeted event hub details can be supplied via a cosmic config file or directly in CLI arguments.

$ az login
$ npx eventhub-consumer --help

 Usage
 	$ eventhub-consumer

 Options
 	------------------------------------------------------------------------------------------------
 	(No arguments)			Searches for a default config file. See 'cosmicconfig'.
 	------------------------------------------------------------------------------------------------
	{config filepath}		The path to the config file to use. See 'cosmicconfig'.
 	------------------------------------------------------------------------------------------------
 	--eventHubsResourceName		The first part of the host name (without ".servicebus.windows.net").
 	--eventHubName			The name of the event hub.
 	------------------------------------------------------------------------------------------------

 Examples
 	$ eventhub-consumer
 	$ eventhub-consumer eventhub-consumer.dev.config.ts
 	$ eventhub-consumer eventhub-consumer.qa.config.ts
 	$ eventhub-consumer --eventHubsResourceName my-namespace --eventHubName myeventhub

Config File

Example Configuration File

eventhub-consumer.config.ts

import {ClientConfiguration} from 'eventhub-consumer/dist/Components/client';

export default {
	eventHubs: {
		eventHubsResourceName: 'my-namespace',
		eventHubName: 'myeventhub',
	},
} as ClientConfiguration;

Install

Alternatively, you may install the package instead of using npx...

$ npm install --global eventhub-consumer
...

Troubleshooting

If you encounter issues, you may need to login into azure and/or disable a few NODE settings...

az login && export NODE_TLS_REJECT_UNAUTHORIZED=0 && export NODE_NO_WARNINGS=1 && npx eventhub-consumer

This project is made with create-ink-app.