Receive mode walkthrough

« back to walkthroughs

This walkthrough will guide you through running the PDL Client to receive PDL products. This guide is based on running on a Debian based system.

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. Configure

In order to receive products, a Receiver and a Listener must be configured. See Receiving for specific types of Receivers and Listeners that can be configured.

Example configuration of a receiver and listener

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

# GLOBALS
#
# These properties must appear before any configuration [sections].
# (Otherwise they would be considered section properties)
#

# The receivers and listeners properties can be a comma delimited list referencing multiple subsections
receivers = receiver
listeners = listener

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

# whether to log timestamps for every log message
logTimestamps = true

# RECEIVERS
#
# Receivers receive notifications about products that are available.
# They notify their listeners, who may request products be downloaded.

# https://ghsc.code-pages.usgs.gov/hazdev/pdl/userguide/receiving/aws-product-receiver.html
[receiver]
type = gov.usgs.earthquake.aws.AwsProductReceiver
index = receiver_index
# Initial age to catch up (in days)
initialCatchUpAge = 0.5
productsCreatedAfterClient = products_created_after_client
storage = receiver_storage
trackingIndex = receiver_tracking_index
url = wss://earthquake.usgs.gov/pdl/east/products/notifications/subscribe

[receiver_index]
type = gov.usgs.earthquake.aws.JsonNotificationIndex
table = receiver_index

[products_created_after_client]
type = gov.usgs.earthquake.aws.ProductsCreatedAfterClient
batchLimit = 100
# Duration to wait to connect in milliseconds 
connectTimeout = 50000
maxRetryAttempts = 5
# Duration to wait to connect in milliseconds 
readTimeout = 30000
urlTemplate = https://earthquake.usgs.gov/pdl/east/products/notifications?broadcastafter={CREATED_AFTER}&limit={BATCH_LIMIT}

[receiver_storage]
type = gov.usgs.earthquake.aws.JsonProductStorage

[receiver_tracking_index]
type = gov.usgs.earthquake.aws.TrackingIndex


# LISTENERS
#
# Notifications are passed from the receivers to all confiugred listeners.  
# Each configured listener then decides if it is interested in processing the product
# associated with the notification.  The following configured listener prints product properties to 
# stdout for each notification it receives

# https://ghsc.code-pages.usgs.gov/hazdev/pdl/userguide/receiving/indexer.html
[listener]
type = gov.usgs.earthquake.distribution.ExternalNotificationListener
listenerIndex = listener_index
storage = listener_storage
command = /bin/echo 

[listener_index]
type = gov.usgs.earthquake.aws.JsonNotificationIndex
table = listener_index

[listener_storage]
type = gov.usgs.earthquake.distribution.FileProductStorage
directory = listener_storage

4. Run

java -jar ProductClient.jar --configFile=./config.ini --receive

Example output

# java -jar ProductClient.jar --configFile=config.ini --receive
Product Distribution Client
Version 3.0.2-beta 2024-08-19

Opened log file at Tue Jun 03 15:39:14 MDT 2025
###
Tue Jun 03 15:39:14 MDT 2025
INFO    thread=1        Starting
Tue Jun 03 15:39:15 MDT 2025
INFO    thread=1        [receiver] requeueing notification index 'receiver_index'
INFO    thread=1        Done finding existing notifications
INFO    thread=1        All notifications queued
Tue Jun 03 15:39:16 MDT 2025
INFO    thread=28       [receiver] onOpen connection_id=fc2562f8-ff58-4606-a4aa-a37451371146 2025-06-03T21:39:16.013656418Z
INFO    thread=28       [receiver] Starting catch up
INFO    thread=1        Started
Tue Jun 03 15:39:17 MDT 2025
INFO    thread=36       [PCATask] Received products_create_after payload, size=425763 bytes, duration=1091 ms, count=100
INFO    thread=37       [listener_indexer] indexed product id=urn:usgs-product:prod01-pdl01.cr.usgs.gov:heartbeat:lenore:1748943601559, status=UPDATE
PRODUCT_ADDED null => null
INFO    thread=40       [indexer_listener] running command /bin/echo --directory=/data/indexer_listener_storage/heartbeat/lenore/prod01-pdl01.cr.usgs.gov/1748943601559 --type=heartbeat --code=lenore --source=prod01-pdl01.cr.usgs.gov --updateTime=2025-06-03T09:40:01.559Z --status=UPDATE "--property-original-signature=MC4CFQDYKnUPoQ52AHfNf2K5b1krRlLxoAIVAK/qZcuGC78oMdEUnxrtqD8Oanc4" "--property-pdl-client-version=Version 2.7.9 2021-02-10" "--property-original-signature-version=v1" --content --contentType=text/plain --signature=WHv0/3bRFUVvrEk36qCffC/yETguWMEjrNbRpqRebroKyFF9NE+K8sX7PrA+ZX3NLfEHgTaStho5zDnGIexhQcJhvSMF/RqTM4d8+8L9vi0+pTV2gmK020aFkCO0c27IV8+dpC3unxeA1/oqGBtOxnRhUu9RBeaIh1yGfFfgIhFIWQ/8R2M4lJiZl9S33p3azB3zBU4OIz3I0DN46DEekPq6nf7orpmhZy/mvUuXzucdNBu2lfw3Ccl/OxTHckc+4GGf9F1hbh0mvCzdfZ5ms9SquYtZ//d/vaQot8q+VBWse64E02VnxGrjZwq9uz+kTml1h78nzk8PpM4RjmhrDw== --action=PRODUCT_ADDED
INFO    thread=40       [indexer_listener] command '/bin/echo --directory=/data/indexer_listener_storage/heartbeat/lenore/prod01-pdl01.cr.usgs.gov/1748943601559 --type=heartbeat --code=lenore --source=prod01-pdl01.cr.usgs.gov --updateTime=2025-06-03T09:40:01.559Z --status=UPDATE "--property-original-signature=MC4CFQDYKnUPoQ52AHfNf2K5b1krRlLxoAIVAK/qZcuGC78oMdEUnxrtqD8Oanc4" "--property-pdl-client-version=Version 2.7.9 2021-02-10" "--property-original-signature-version=v1" --content --contentType=text/plain --signature=WHv0/3bRFUVvrEk36qCffC/yETguWMEjrNbRpqRebroKyFF9NE+K8sX7PrA+ZX3NLfEHgTaStho5zDnGIexhQcJhvSMF/RqTM4d8+8L9vi0+pTV2gmK020aFkCO0c27IV8+dpC3unxeA1/oqGBtOxnRhUu9RBeaIh1yGfFfgIhFIWQ/8R2M4lJiZl9S33p3azB3zBU4OIz3I0DN46DEekPq6nf7orpmhZy/mvUuXzucdNBu2lfw3Ccl/OxTHckc+4GGf9F1hbh0mvCzdfZ5ms9SquYtZ//d/vaQot8q+VBWse64E02VnxGrjZwq9uz+kTml1h78nzk8PpM4RjmhrDw== --action=PRODUCT_ADDED' exited with status '0'
INFO    thread=37       [listener_indexer] indexed product id=urn:usgs-product:prod02-pdl01.cr.usgs.gov:heartbeat:lenore:1748943601821, status=UPDATE
PRODUCT_ADDED null => null
INFO    thread=40       [indexer_listener] running command /bin/echo --directory=/data/indexer_listener_storage/heartbeat/lenore/prod02-pdl01.cr.usgs.gov/1748943601821 --type=heartbeat --code=lenore --source=prod02-pdl01.cr.usgs.gov --updateTime=2025-06-03T09:40:01.821Z --status=UPDATE "--property-original-signature=MC0CFAdc+zYKwgnzuiRNsmuELByDuaqxAhUAoavrO+b+B7X3650gWeKqY3+EboQ=" "--property-pdl-client-version=Version 2.7.9 2021-02-10" "--property-original-signature-version=v1" --content --contentType=text/plain --signature=JFHrOjcLdNkNC20M1CAekPouazGEGfc8k+ko/RMLez0TGuo52P8WBdtBvQN4KWSuw8WIUvuCnzbbNlRKfLqQJ0v4tdI/9+s0wuKiahv+cL5ILJIfX1V0km9dcvSzSbTQwL59oj4l2hiGo5QVen9HbLWp3bIfXmxFF5zrGOEUnxuYrBI5vj+12Iv4cYKPEs2LcaRYGofwgBImKvHZRJxH/4FihRa0EkxXNM0je1IZrpUsZWMbErtDaphn5hE1uGnieHjaHSN2ENnLXA2NBrhj+nsb+yIWPqr5jV3zXD3f3N7lpSIBKYxwSX8Sf8q0EG5ypYFsOYynW4XvlsY+bX3h/w== --action=PRODUCT_ADDED
INFO    thread=40       [indexer_listener] command '/bin/echo --directory=/data/indexer_listener_storage/heartbeat/lenore/prod02-pdl01.cr.usgs.gov/1748943601821 --type=heartbeat --code=lenore --source=prod02-pdl01.cr.usgs.gov --updateTime=2025-06-03T09:40:01.821Z --status=UPDATE "--property-original-signature=MC0CFAdc+zYKwgnzuiRNsmuELByDuaqxAhUAoavrO+b+B7X3650gWeKqY3+EboQ=" "--property-pdl-client-version=Version 2.7.9 2021-02-10" "--property-original-signature-version=v1" --content --contentType=text/plain --signature=JFHrOjcLdNkNC20M1CAekPouazGEGfc8k+ko/RMLez0TGuo52P8WBdtBvQN4KWSuw8WIUvuCnzbbNlRKfLqQJ0v4tdI/9+s0wuKiahv+cL5ILJIfX1V0km9dcvSzSbTQwL59oj4l2hiGo5QVen9HbLWp3bIfXmxFF5zrGOEUnxuYrBI5vj+12Iv4cYKPEs2LcaRYGofwgBImKvHZRJxH/4FihRa0EkxXNM0je1IZrpUsZWMbErtDaphn5hE1uGnieHjaHSN2ENnLXA2NBrhj+nsb+yIWPqr5jV3zXD3f3N7lpSIBKYxwSX8Sf8q0EG5ypYFsOYynW4XvlsY+bX3h/w== --action=PRODUCT_ADDED' exited with status '0'
INFO    thread=37       [listener_indexer] indexed product id=urn:usgs-product:tx:origin:tx2025ktwa:1748943652022, status=UPDATE



Last modified: Thu Jun 26 16:17:23 UTC 2025