Search code examples
apache-pulsarspring-pulsar

Pulsar Consumer process delay in network connection reset


I have an issue in pulsar consumer The subscription type is Key_Shared The consumer consumed message, it has been disconnected from pulsar with network error and pod has been restarted and message has not been processed Consumer didn't send neghther ack nor nack to the server The new consumer started and consumed message after 90 minutes The problem is that Why didn't consumer receive message again immediately?


Solution

  • I've solved the issue by setting ackTimeout in consumer.

    By default, the acknowledge timeout is disabled and that means that messages delivered to a consumer will not be re-delivered unless the consumer crashes. I've set some configs for acknowledge timeout to process message again

    https://pulsar.apache.org/docs/3.1.x/concepts-messaging/

    In spring-pulsar, this configuration works: spring.pulsar.reactive.consumer.ack-timeout

    https://docs.spring.io/spring-pulsar/docs/current-SNAPSHOT/reference/html/#:~:text=spring.pulsar.reactive.consumer.ack%2Dtimeout