Skip to content

[Bug] Consumer should retry for the subscription fence error #1369

@RobertIndie

Description

@RobertIndie

This CI failure exposed the issue: https://github.com/apache/pulsar-client-go/actions/runs/15014358114/job/42188862912#step:6:2767

Actual behavior

Consumer will fail immediately without any retry for the subscription fence error.

time="2025-05-14T07:09:02Z" level=error msg="Failed to create consumer" consumerID=8 error="server error: ServiceNotReady: Subscription is fenced" name=ypbxo subscription=my-sub topic="persistent://public/default/my-topic-437318013-partition-0"

    consumer_test.go:2346: 
        	Error Trace:	/pulsar/pulsar-client-go/pulsar/consumer_test.go:2346
        	Error:      	Expected nil, but got: &errors.errorString{s:"server error: ServiceNotReady: Subscription is fenced"}
        	Test:       	TestConsumerAddTopicPartitions

Expected behavior

Consumer should retry for the subscription fence error

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions