Skip to content

[Bug] default nack backoff policy overflows to zero #1384

Open
@Gilthoniel

Description

@Gilthoniel

Expected behavior

The default nack backoff policy should return the maximum backoff time once reaching an arbitrary high redelivery count.

Actual behavior

The default nack backoff policy returns zero once a sufficiently big redelivery count is reached.

Steps to reproduce

func TestDefaultNackBackoffPolicy_Next(t *testing.T) {
	defaultNackBackoff := new(defaultNackBackoffPolicy)

	res := defaultNackBackoff.Next(math.MaxUint32)
	assert.Equal(t, 10*time.Minute, res)
}

System configuration

Pulsar version: v4.0.5
Pulsar Go client: v0.15.1

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