apache/pulsar-client-go

InitialSubscriptionName for DLQPolicy

justinrixx opened this issue · 0 comments

Is your feature request related to a problem? Please describe.
From the docs:

By default, there is no subscription during DLQ topic creation. Without a just-in-time subscription to the DLQ topic, you may lose messages. To automatically create an initial subscription for the DLQ, you can specify the initialSubscriptionName parameter.

These docs reference the java client. I don't see a corresponding option in the go client (I would expect to find a corresponding field on the DLQPolicy struct).

Describe the solution you'd like
The ability to create an initial subscription for a DLQ when creating a consumer with a retry-letter/deadletter policy. Likely a new string or *string field on DLQPolicy which does the same thing as initialSubscriptionName() from the java client does, but only if the value is not empty

Describe alternatives you've considered
I believe the alternative in order to avoid losing messages is to initialize the subscription to the dead letter topic before creating the consumer which produces to the dead letter topic.

If this option already exists, please point me in the right direction and close this issue.

Thanks!