38
38
# Default: empty
39
39
endpoint : " "
40
40
` ` `
41
+
41
42
{% endcode %}
42
43
43
44
### Examples
@@ -52,12 +53,14 @@ If you access your AWS SQS queue from inside AWS via a service that supports dyn
52
53
queue is in the same region.
53
54
54
55
{% code title=".rr.yaml" %}
56
+
55
57
` ` ` yaml
56
58
sqs:
57
- # No parameters are required. Normally, if your IAM role has the required permissions and your service endpoint
58
- # is in the same region, the environment variables associated with your instance/task will resolve all the
59
- # configuration for you. You must provide the parent sqs key to enable SQS, even if you want to use the defaults.
59
+ # No parameters are required. Normally, if your IAM role has the required permissions and your service endpoint
60
+ # is in the same region, the environment variables associated with your instance/task will resolve all the
61
+ # configuration for you. You must provide the parent sqs key to enable SQS, even if you want to use the defaults.
60
62
` ` `
63
+
61
64
{% endcode %}
62
65
63
66
# ### AWS SQS in different region with dynamic IAM
@@ -66,11 +69,13 @@ If you access your AWS SQS queue from inside AWS via a service that supports dyn
66
69
queue is in a different region.
67
70
68
71
{% code title=".rr.yaml" %}
72
+
69
73
` ` ` yaml
70
74
sqs:
71
75
# Only region is required
72
76
region: eu-central-1
73
77
` ` `
78
+
74
79
{% endcode %}
75
80
76
81
# ### AWS SQS without dynamic IAM
@@ -80,6 +85,7 @@ an access key and secret. If you access the service from outside AWS, you must a
80
85
You may also use this option if your service *does* support dynamic IAM, but you want to use explicit access keys.
81
86
82
87
{% code title=".rr.yaml" %}
88
+
83
89
` ` ` yaml
84
90
sqs:
85
91
key: ASIAIOSFODNN7EXAMPLE
88
94
# If in a different region *or* if outside AWS, provide the correct region.
89
95
region: eu-west-1
90
96
` ` `
97
+
91
98
{% endcode %}
92
99
93
100
# ### Self-hosted (ElasticMQ)
94
101
95
102
If you self-host your SQS-compatible queue, only the endpoint is required.
96
103
97
104
{% code title=".rr.yaml" %}
105
+
98
106
` ` ` yaml
99
107
sqs:
100
108
endpoint: http://127.0.0.1:9324
101
109
` ` `
110
+
102
111
{% endcode %}
103
112
104
113
After you have configured the driver, you should configure the queue that will use this connection.
@@ -171,18 +180,48 @@ Default: `10`
171
180
172
181
# ## Visibility Timeout
173
182
174
- ` visibility_timeout` - The duration (in seconds) that the received messages are hidden from subsequent retrieve requests
175
- after being retrieved by a `ReceiveMessage` request. Max value is `43200` seconds (12 hours).
183
+ ` visibility_timeout` - The duration (in seconds) that received messages are hidden from subsequent retrieve requests
184
+ after being retrieved by a consumer. This value should be **longer** than the time you expect each job to take, or the
185
+ job may run multiple times. You should rarely set this value to zero, as that will cause the same job to be delivered to
186
+ **all** consumers of the queue each time they request messages from it. If you do not provide a value for this
187
+ parameter, the `VisibilityTimeout` attribute of the queue is used, which defaults to 30 seconds. For more
188
+ information, see the documentation on
189
+ [visibility timeouts](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html).
190
+
191
+ Max value is `43200` seconds (12 hours).
192
+ Default : ` null`
193
+
194
+ # ## Error Visibility Timeout
195
+
196
+ ` error_visibility_timeout` - If `retain_failed_jobs` is enabled, this is the duration (in seconds) that `NACK`'ed (or
197
+ failed) jobs will have their visibility timeout changed to. Note that you cannot have a message remain invisible for
198
+ more than the maximum value in cases where it fails multiple times, so setting this value to the maximum is error-prone.
199
+ This parameter is ignored if `retain_failed_jobs` is `false`, and it must be larger than zero to apply.
176
200
201
+ Max value is `43200` seconds (12 hours).
177
202
Default : ` 0`
178
203
204
+ # ## Retain Failed Jobs
205
+
206
+ ` retain_failed_jobs` - If enabled, jobs will not be deleted and requeued if they fail. Instead, RoadRunner will
207
+ simply let them be processed again after `visibility_timeout` has passed. If you set `error_visibility_timeout` and
208
+ enable this feature, RoadRunner will change the timeout to the value of `error_visibility_timeout`. This lets you
209
+ customize the timeout for errors specifically. If you enable this feature, you can configure SQS to automatically
210
+ move jobs that fail multiple times to a
211
+ [dead-letter queue](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html).
212
+
213
+ Default : ` false`
214
+
179
215
# ## Wait Time
180
216
181
217
` wait_time_seconds` - The duration (in seconds) for which the call waits for a message to arrive in the queue before
182
218
returning. If a message is available, the call returns sooner than `wait_time_seconds`. If no messages are available and
183
- the wait time expires, the call returns successfully with an empty list of messages.
219
+ the wait time expires, the call returns successfully with an empty list of messages. If you do not provide a value for
220
+ this parameter, the `ReceiveMessageWaitTimeSeconds` attribute of the queue is used, which defaults to 0, and you will be
221
+ using short polling. See the documentation on the differences between
222
+ [short and long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html).
184
223
185
- Default : ` 5 `
224
+ Default : ` null `
186
225
187
226
# ## Queue
188
227
@@ -195,7 +234,8 @@ Default: `default`
195
234
196
235
` message_group_id` - Message group ID is required for FIFO queues. Messages that belong to the same message group are
197
236
processed in a FIFO manner.
198
- More info : [link](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageGroupId)
237
+ More info :
238
+ [link](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/APIReference/API_SendMessage.html#SQS-SendMessage-request-MessageGroupId)
199
239
200
240
# ## Skip Queue Declaration
201
241
0 commit comments