AWS Product Receiver
An AWS Product Receiver connects to a web socket to receive JSON Notifications about products. In addition to the standard receiver properties, this type of receiver accepts the following specific properties:
- anyMessageInterval
- The interval (in milliseconds) in which any type of message is expected to be received from the socket. If no message is received in this interval, it is assumed the socket has gone stale and the connection is re-established. If set to 0 or a negative value this functionality is not enabled.
- Optional, Default:
0
- connectAttempts
- An integer number of times to try the websocket connection.
- Optional, Default:
5
- productsCreatedAfterClient
- The name of a separate configuration sub-section defining a ProductsCreatedAfterClient that is used for catch-up processing during startup and when a missing notification is detected.
- Required
- initialCatchUpAge
- The initial age (in decimal days) for which to initially pull products for a new receiver.
- Note: Receivers that have previously started and are re-starting will
catch up based on information in their tracking index rather than their
configured
initialCatchUpAge
. To restart processing using theinitialCatchUpAge
property, the tracking index must be cleared as well. - Optional, Default:
7.0
- pingInterval
- How often to send ping in milliseconds. If you do not want to send pings set to 0 or negative value.
- Optional, Default:
15000
- pingWait
- How long to wait, in milliseconds, before declaring socket down and closing and retrying.
- Optional, Default:
4000
- trackingFileName
- The name of the file in which to track products.
- This is a shortcut for defining the
trackingIndex
. Only one oftrackingIndex
ortrackingFileName
should be specified. If both are specified, thetrackingIndex
takes precedence. - trackingIndex
- Name of a separate configuration sub-section defining a NotificationIndex implementation
- Only one of
trackingIndex
ortrackingFileName
should be specified. If both are specified, thetrackingIndex
takes precedence. url - The web socket URL from which the receiver will receive notifications.
-
Required
Example configuration
Note: This is a fully configured AwsProductReceiver using the default values for optional parameters
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# GLOBALS
#
# These properties must appear before any configuration [sections].
# (Otherwise they would be considered section properties)
#
receivers = receiver
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
[receiver]
type = gov.usgs.earthquake.aws.AwsProductReceiver
# the following configuration parameters are supported by all receivers
cleanupInterval = 900000
connectTimeout = 15000
index = receiver_index
listenerNotifier = executor
readTimeout = 15000
storage = receiver_storage
storageAge = 3600000
# the following are specific to an AwsProductReceiver
anyMessageInterval = 0
connectAttempts = 5
productsCreatedAfterClient = products_created_after_client
initialCatchUpAge = 0.5
pingInterval = 15000
pingWait = 4000
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
[receiver_storage]
type = gov.usgs.earthquake.aws.JsonProductStorage
[products_created_after_client]
type = gov.usgs.earthquake.aws.ProductsCreatedAfterClient
batchLimit = 100
connectTimeout = 50000
maxRetryAttempts = 5
readTimeout = 30000
urlTemplate = https://earthquake.usgs.gov/pdl/east/products/notifications?broadcastafter={CREATED_AFTER}&limit={BATCH_LIMIT}
[receiver_tracking_index]
type = gov.usgs.earthquake.aws.TrackingIndex
Last modified: Thu Jun 26 16:16:09 UTC 2025