Pulsar GoClient Equivalent of unacked_messages_timeout_ms (py-client)

140 views Asked by At

In Pulsar Python Client, there is subscriber option unacked_messages_timeout_ms to set the interval after which the unacked messages will be redelivered.

What is the equivalent of that in Pulsar Go Client ?

Python

py_consumer = client.subscribe(
    topic='my-topic',
    subscription_name="py-subscriber",
    unacked_messages_timeout_ms=10000,
    consumer_type=pulsar.ConsumerType.Shared
    )

Golang

go_consumer, err := client.Subscribe(
    pulsar.ConsumerOptions{
    Topic: "my-topic",
    SubscriptionName: "go-subscriber",
    Type: pulsar.Shared,
    unacked_messages_timeout_ms ????
})

I could not find anything here: https://pkg.go.dev/github.com/apache/pulsar-client-go/pulsar#ConsumerOptions

if it s not there, how to configure the re-delivery interval and what is the default value ?

Same question asked in Github Issues too: https://github.com/apache/pulsar-client-go/issues/608

1

There are 1 answers

3
Matteo Merli On BEST ANSWER

The "unacked messages timeout" is kind of a deprecated feature that was introduced long time ago.

More recently we have added the concept of "negative acks" to provide the application an easy way to handle failure in the processing of a message.

Since the Go client was written when negative acks were already available, we decided to not introduce the deprecated feature in there.