Sending product walkthrough

« back to walkthroughs

This walkthrough will guide you through running the client to send products to PDL using the AwsProductSender.

1. Ensure the correct Java version is installed

See installing Java walkthrough

2. Ensure the PDL client is installed

See Downloading to choose a version to download.

3. Setup keys

In order to send products you must generate a keypair and send your public key to gs-haz_dev_team_group@usgs.gov. See sending products for more information on generating a keypair.

4. Configure

The client will look for a config.ini file in the working directory, but can be changed to point to use any file path using a cli flag when running the client --configFile=/some/path/to/config.ini

Example config.ini

Note that the url used in this example is the production url. Unless keys have been set up correctly from the previous step, products will fail to send. Reach out to gs-haz_dev_team_group@usgs.gov for testing and/or integrating with a different environment

# GLOBALS
#
# These properties must appear before any configuration [sections].
# (Otherwise they would be considered section properties)
#
# Any parameters configured with a path (such as `logdirectory` in the GLOBAL section, or `privateKey` in configuration section)
# are treated as relative paths from the working directory of the Java -jar command

senders = realtime_sender, comcat_sender

logdirectory = log
# (default = INFO), one of SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST
loglevel = INFO
# whether to sent console output to the log file
redirectconsole = false

# SENDERS
#
# Senders send products to hubs for Product Creators.
[comcat_sender]
type = gov.usgs.earthquake.aws.AwsProductSender
url = https://earthquake.usgs.gov
privateKey = ./comcat-private-key
signProducts = true
sendProductPath = /pdl/west/send_product
getUploadUrlsPath = /pdl/west/get_upload_urls
contentFormat = ARRAY

[realtime_sender]
type = gov.usgs.earthquake.aws.AwsProductSender
url = https://earthquake.usgs.gov
privateKey = ./realtime-private-key
signProducts = true

5. Run

The CLI options for sending a product are documented in sending products. To send an empty product run the following command:

java -jar ProductClient.jar --send --type=productType --code=productCode --source=productSource

Example output:

# java -jar ProductClient.jar --send  --configFile=./config.ini --source-productSource --type=productType --code=productCode 
Product Distribution Client
INFO    thread=1        Running Product Builder 

INFO    thread=20       [comcat_sender] send product total urn:usgs-product:productSource:productType:productCode:1749129746883 (1489 ms) 
INFO    thread=19       [realtime_sender] send product total urn:usgs-product:productSource:productType:productCode:1749129746883 (2255 ms)
urn:usgs-product:productSource:productType:productCode:1749129746883



Last modified: Tue Jun 17 22:05:26 UTC 2025