Relaying Products
Relaying products refers to how PDL systems send and receive products between each other. Relays can be a receiver and sender combination using a relay product listener or they can also be set up as a receiver and InputWedge combination. Products are stored in a directory by the receiver and then sent out by the InputWedge polling that directory for products.
An example setup for an InputWedge and Receiver combination:
Example Receiver configuration. Refer to AwsProductReceiver for more details.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
receivers = receiver_aws
listeners = default_listener
[receiver_aws]
type = gov.usgs.earthquake.aws.AwsProductReceiver
storage = file_product_storage
url = wss://earthquake.usgs.gov/pdl/west/subscribe
initialCatchUpAge = .25 #Number of days to catch up(default 7.0 days, max 30.0)
productsCreatedAfterClient = receiver_aws_products_created_after
[receiver_aws_products_created_after]
type = gov.usgs.earthquake.aws.ProductsCreatedAfterClient
batchLimit = 100
urlTemplate = https://earthquake.usgs.gov/pdl/west/products_created_after?created_after={CREATED_AFTER}&limit={BATCH_LIMIT}
[file_product_storage]
type = gov.usgs.earthquake.distribution.ConsolidatedFileProductStorage
useAtomicDownload = true
directory = pollDirectory
[default_listener]
type = gov.usgs.earthquake.distribution.DefaultNotificationListener
listenerIndexFile = test_index.db
Note:
The
useAtomicDownload
property in theConsolidatedFileProductStorage
/FileProductStorage
classes should be used when running both the Receiver and the InputWedge at the same time. This is to ensure that the InputWedge’s directory poller does not grab any incompletely stored products.Without a listener, products will not get downloaded into the directory storage because no listeners would be asking for them.
Example InputWedge configuration. Refer to InputWedge for more details.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
senders = sender_aws
privateKeyFile = ./product-key
signatureVersion = v2
parser = gov.usgs.earthquake.distribution.QuakemlProductCreator
createInternalProducts = false
createScenarioProducts = false
sendOriginWhenPhasesExist = true
sendMechanismWhenPhasesExist = true
poller = directory_poller
connectTimeout = 15000 #Milliseconds before connection attempts timeout
parallelSend = true
parallelSendTimeout = 300 #Timeout for parallel sends in seconds
[sender_aws]
type = gov.usgs.earthquake.aws.AwsProductSender
url = https://earthquake.usgs.gov/pdl/west/
signProducts = true
privateKey = ./product-key
[directory_poller]
type = gov.usgs.util.DirectoryPoller
pollDirectory = pollDirectory
oldInputDirectory = oldInputDirectory
errorDirectory = errorDirectory
interval = 5000 #Milliseconds between polling
pollCarefully = true
In order to set up this relay method, two instances of the PDL Client will need to be run simultaneously: one for the Receiver, the other for the InputWedge. This example is set up to use two different config.ini
files for clarity, but they could be combined into one configuration file that both instances could use.
Example Receiver run command.
java -jar ProductClient.jar --configFile=receiver_config.ini --receive
Example InputWedge run command.
java -jar ProductClient.jar --mainclass=gov.usgs.earthquake.distribution.InputWedge --configFile=wedge_config.ini --poll
Last modified: Tue Mar 26 16:37:56 UTC 2025