Skip to content

Consumer restart causes duplicate messages #161

Closed
@sobychacko

Description

@sobychacko
Collaborator

Scenario:

  1. Start an exclusive consumer--> Receive message.
  2. Stop the consumer.
  3. Restart the consumer or start another consumer under the same subscription name.
  4. Occasionally, the same message that was already seen by the first consumer reappears in the second consumer.

The reason is because in step 2 above, when we stop the container if there are any acks in progress, they are immediately aborted by stopping the consumer and then the container is stopped. We need to wait for the consumer thread to finish what it is doing before stopping the consumer.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

    Development

    Participants

    @sobychacko@onobc

    Issue actions

      Consumer restart causes duplicate messages · Issue #161 · spring-projects/spring-pulsar