Commands¶
hop-client provides a command line interface for various tasks:
hop auth
: Authentication utilitieshop list-topics
: SHow accessible Kafka topicshop publish
: Publish messages such as GCN circulars and noticeshop subscribe
: Listen to messages such as GCN circulars and noticeshop version
: Show version dependencies ofhop-client
hop auth
¶
This command allows a user to configure credentials for authentication.
usage: hop auth [-h] [-q | -v] <command> ...
Authentication configuration utilities.
optional arguments:
-h, --help show this help message and exit
-q, --quiet If set, only display warnings and errors.
-v, --verbose If set, display additional logging messages.
commands:
<command>
locate display configuration path
list Display all stored credentials
add Load a credential, specified either via a CSV file or
interactively
remove Delete a stored credential
No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`
hop list-topics
¶
This command allows a user to view the topics that are available for subscribing or publishing on a given Hopskotch server.
Note that other topics may exist which the current user does not have permission to access.
usage: hop list-topics [-h] [--no-auth] URL
List available topics.
positional arguments:
URL Sets the URL (kafka://host[:port]/topic) to publish messages to.
optional arguments:
-h, --help show this help message and exit
--no-auth If set, disable authentication.
No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`
hop publish
¶
This command allows a user to publish various structured and unstructured messages, including:
An XML formatted GCN/VOEvent notice
Unstructured messages such as JSON-serializable data, Apache Avro-serializable data, or raw data bytes (blobs).
Structured messages such as GCN circulars and VOEvents are published as JSON-formatted text.
Unstructured messages may be piped to this command to be published. This mode of operation requires either the blob format (-f BLOB) or JSON (-f JSON) to be selected, and splits the input into separate messages at newlines.
usage: hop publish [-h] [--no-auth] [-q | -v]
[-f {VOEVENT,CIRCULAR,BLOB,JSON,AVRO}] [-t]
URL [MESSAGE [MESSAGE ...]]
Publish messages.
positional arguments:
URL Sets the URL (kafka://host[:port]/topic) to publish
messages to.
MESSAGE File of messages to publish. (standard input is used
if omitted)
optional arguments:
-h, --help show this help message and exit
--no-auth If set, disable authentication.
-q, --quiet If set, only display warnings and errors.
-v, --verbose If set, display additional logging messages.
-f {VOEVENT,CIRCULAR,BLOB,JSON,AVRO}, --format {VOEVENT,CIRCULAR,BLOB,JSON,AVRO}
Specify the message format. Defaults to BLOB for an
unstructured message.
-t, --test Mark messages as test messages by adding a header with
key '_test'.
No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`
hop subscribe
¶
This command allows a user to subscribe to messages and print them to stdout.
usage: hop subscribe [-h] [--no-auth] [-q | -v] [-s {EARLIEST,LATEST}] [-e]
[-g GROUP_ID] [-j] [-t]
URL
Subscribe to messages.
positional arguments:
URL Sets the URL (kafka://host[:port]/topic) to publish
messages to.
optional arguments:
-h, --help show this help message and exit
--no-auth If set, disable authentication.
-q, --quiet If set, only display warnings and errors.
-v, --verbose If set, display additional logging messages.
-s {EARLIEST,LATEST}, --start-at {EARLIEST,LATEST}
Set the message offset offset to start at. Default:
LATEST.
-e, --until-eos If set, only subscribe until EOS is received (end of
stream). Otherwise, listen to messages indefinitely.
-g GROUP_ID, --group-id GROUP_ID
Consumer group ID. If unset, a random ID will be
generated.
-j, --json Request message output as raw json
-t, --test Process test messages instead of ignoring them.
No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`
hop version
¶
This command prints all the versions of the dependencies
usage: hop version [-h]
List all the dependencies' versions.
optional arguments:
-h, --help show this help message and exit
No valid credential data found
You can get a credential from https://my.hop.scimma.org
To load your credential, run `hop auth add`