spark: the AMPS command-line client

The AMPS distribution includes a command-line client that provides a basic subset of AMPS operations.

Interacting with AMPS Using Spark

AMPS provides the spark utility as a command line interface to interacting with an AMPS server. spark provides many of the capabilities of the AMPS client libraries through this interface. The utility lets you execute AMPS commands from the command line. spark is a Java application, and requires Java runtime environment version 1.7 or later on the system.

spark is most commonly used for ad hoc testing or simple maintenance tasks. For more complicated tasks or more sophisticated maintenance, 60East recommends using one of the client libraries (such as the AMPS Python Client).

To test spark with the sample configuration, run the following command:

$ $AMPSDIR/bin/spark ping -server localhost:9007 -type json

This command tests connectivity to the AMPS server running at port 9007 on the local system. It confirms that the server is listening on that port using the default protocol for AMPS and accepts JSON messages on that port. The command should produce output like the following:

Successfully connected to tcp://username@localhost:9007/amps/json

You can read more about spark and other useful tools for troubleshooting AMPS in the Utilities chapter of the AMPS User Guide.

It's important to keep in mind that spark only provides basic functionality -- that is, operations that don't require any particular application logic or special handling. This guide uses spark for examples where possible, but some features of AMPS (for example, setting certain headers on messages published to AMPS) are only available through the AMPS client libraries.

Last updated

Copyright 2013-2024 60East Technologies, Inc.