A subscription to a topic.Messages are delivered to the subscription’s queue and retried up to a
maximum number of times. If a message cannot be delivered after the maximum
number of retries it is moved to the dead letter queue.The dead letter queue is a directory of JSON files containing the serialized
message.Messages remain in the dead letter queue until they are removed manually.Attributes:
topic: The topic that the subscription receives messages from.
max_retries: The maximum number of times a message will be retried for
this subscription.
dead_letter_queue_path: The path to the dead letter queue folder.
Cleanup resources by unsubscribing from the topic.This should be called when the consumer is no longer needed to prevent
memory leaks from orphaned subscriptions.