receive_dead_letter_queue_records
async
¶
receive_dead_letter_queue_records(
queue_arn: QueueARN,
*,
config_overrides: Optional[AsyncKinesisClientConfig] = None,
limit: Optional[ReceiveQueueRecordsInputLimit] = None,
wait_time_seconds: Optional[ReceiveQueueRecordsWaitTimeSeconds] = None,
visibility_timeout_seconds: Optional[VisibilityTimeoutSeconds] = None,
) -> ReceiveDeadLetterQueueRecordsOutput
Receives up to 10 dead-letter records from the specified queue. Each queue has built-in dead-letter handling: when a record has been received MaxReceiveCount times without being acknowledged, it becomes a dead-letter record, which usually means your queue consumer could not process it. The dead-letter record stays in the same queue, and ReceiveQueueRecords no longer returns it.
Dead-letter records carry the same data and partition key as when they were first delivered, and are returned with a receipt handle. Use the receipt handle to acknowledge the record with AcknowledgeDeadLetterQueueRecords, which discards it, to change its visibility with UpdateDeadLetterQueueRecordsVisibility, or to restore it with RestoreDeadLetterQueueRecords, which returns it to the normal receive path so that ReceiveQueueRecords can return it again.
Use this operation to inspect the records your queue consumer could not process, so you can correct the cause and then either acknowledge or restore them.
A queue delivers dead-letter records while it is in the ACTIVE state.
Parameters:
-
queue_arn(QueueARN) –The ARN of the queue whose dead-letter records are received.
-
limit(Optional[ReceiveQueueRecordsInputLimit], default:None) –The maximum number of records to return. The queue never returns more dead-letter records than this value, and might return fewer. The default is 10.
-
wait_time_seconds(Optional[ReceiveQueueRecordsWaitTimeSeconds], default:None) –The duration, in seconds, that the call waits for a record to become visible before returning. The default is 9.
-
visibility_timeout_seconds(Optional[VisibilityTimeoutSeconds], default:None) –The duration, in seconds, that the records returned by this request are in flight and not visible to any consumer instance. If you do not specify this value, the queue's visibility timeout is used.
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.
-
KMSAccessDeniedException–The ciphertext references a key that doesn't exist or that you don't have access to.
-
KMSDisabledException–The request was rejected because the specified KMS key isn't enabled.
-
KMSInvalidStateException–The request was rejected because the state of the specified resource isn't valid for this request. For more information, see How Key State Affects Use of a Customer Master Key in the Amazon Web Services Key Management Service Developer Guide.
-
KMSNotFoundException–The request was rejected because the specified entity or resource can't be found.
-
KMSOptInRequired–The Amazon Web Services access key ID needs a subscription for the service.
-
KMSThrottlingException–The request was denied due to request throttling. For more information about throttling, see Limits in the Amazon Web Services Key Management Service Developer Guide.
-
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
2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 | |