Acknowledges up to 10 records from the specified queue. After a record is acknowledged, the queue does not deliver it again. The result for each entry is reported individually in the response.
Acknowledging a record does not affect the record in the data stream. That record remains available to stream consumers and to other queues on the same stream for the rest of its retention period.
Because the request can result in a combination of successful and unsuccessful entries, check the Failed list even when the call returns an HTTP status code of 200.
On rare occasions, you can receive a record again after you acknowledge it. Design your queue consumer to be idempotent, so that processing the same record more than once is safe.
Parameters:
Raises:
-
AccessDeniedException
–
Specifies that you do not have the permissions required to perform this operation.
-
InternalFailureException
–
The processing of the request failed because of an unknown error, exception, or failure.
-
InvalidArgumentException
–
A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.
-
ResourceNotFoundException
–
The requested resource could not be found. The stream might not be specified correctly.
-
ThrottlingException
–
The request was denied because the request rate is too high. Reduce the frequency of your requests, and retry them with exponential backoff.
-
UnknownServiceError
–
The service returned an error code this client does not model.
Source code in docs_src/capo_kinesis/_services/async_kinesis.py
| async def acknowledge_queue_records(
self,
queue_arn: "capo_kinesis.types.queue_arn.QueueARN",
entries: "capo_kinesis.types.acknowledge_queue_records_request_entry_list.AcknowledgeQueueRecordsRequestEntryList",
*,
config_overrides: Optional[AsyncKinesisClientConfig] = None,
) -> "capo_kinesis.types.acknowledge_queue_records_output.AcknowledgeQueueRecordsOutput":
"""<p>Acknowledges up to 10 records from the specified queue. After a record is acknowledged, the queue does not deliver it again. The result for each entry is reported individually in the response.</p> <p>Acknowledging a record does not affect the record in the data stream. That record remains available to stream consumers and to other queues on the same stream for the rest of its retention period.</p> <p>Because the request can result in a combination of successful and unsuccessful entries, check the <code>Failed</code> list even when the call returns an HTTP status code of <code>200</code>.</p> <p>On rare occasions, you can receive a record again after you acknowledge it. Design your queue consumer to be idempotent, so that processing the same record more than once is safe.</p>
Args:
queue_arn: <p>The ARN of the queue the records were received from.</p>
entries: <p>The records to acknowledge, identified by their receipt handles.</p>
Raises:
capo_kinesis.errors.access_denied_exception.AccessDeniedException: <p>Specifies that you do not have the permissions required to perform this operation.</p>
capo_kinesis.errors.internal_failure_exception.InternalFailureException: <p>The processing of the request failed because of an unknown error, exception, or failure.</p>
capo_kinesis.errors.invalid_argument_exception.InvalidArgumentException: <p>A specified parameter exceeds its restrictions, is not supported, or can't be used. For more information, see the returned message.</p>
capo_kinesis.errors.resource_not_found_exception.ResourceNotFoundException: <p>The requested resource could not be found. The stream might not be specified correctly.</p>
capo_kinesis.errors.throttling_exception.ThrottlingException: <p>The request was denied because the request rate is too high. Reduce the frequency of your requests, and retry them with exponential backoff.</p>
capo_kinesis.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
async def _handler(
req: "AsyncOperationRequest[capo_kinesis.types.acknowledge_queue_records_input.AcknowledgeQueueRecordsInput]",
) -> AsyncOperationResponse[
"capo_kinesis.types.acknowledge_queue_records_output.AcknowledgeQueueRecordsOutput"
]:
import capo_kinesis._operations.kinesis_20131202.acknowledge_queue_records
(
output,
http_response,
) = await capo_kinesis._operations.kinesis_20131202.acknowledge_queue_records.async_acknowledge_queue_records(
req.options, req.input
)
return AsyncOperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AcknowledgeQueueRecords")
)
input_: capo_kinesis.types.acknowledge_queue_records_input.AcknowledgeQueueRecordsInput = {
"queue_arn": queue_arn,
"entries": entries,
}
response = await aexecute_pipeline(
AsyncOperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
await response.response.aclose()
return response.output
|