Skip to content

bug(Rust SDK): IggyConsumer::next() after shutdown() hangs or silently drops offsets #3910

Description

@haubur

Bug description

Description
When calling shutdown() on the IggyConsumer polling is still possible with next() but causes unintended behavior for:

  1. standalone consumer next() still consumes messages from buffer or server, while sending offsets is prevented due to dropping the channel in shutdown()
  2. a consumer group member after shutdown can still call next but hangs indefinitely:
    while !can_poll.load(ORDERING)

Calling init() again is idempotent, so a user cannot recover from this state.

Options

  • make poll_next() check shutdown() and return
  • None to respect the Stream trait
  • IggyError that can be handled by the user (preferred)

Affected area / component

Rust SDK

Deployment

None

Versions

No response

Hardware / environment

No response

Sample code

No response

Logs

No response

Iggy server config

No response

Reproduction

No response

Contribution

  • I'm willing to submit a pull request to fix this bug

Good first issue

  • I think this could be a good first issue for a new contributor

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingrustPull requests that update Rust code

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions