Skip to content

Replace Task with ValueTask for performance optimization in Surge consumer and producer  #5390

@qodo-code-review

Description

@qodo-code-review

Description

  • The Surge library has been updated to use ValueTask instead of Task for better performance characteristics, particularly for operations that frequently complete synchronously
  • Consumer and producer implementations need to be updated to align with the new Surge API contracts
  • Test fixtures must be updated to match the new interface signatures

Deliverables

  • Update Consumer: Convert SystemConsumer methods (Track, Commit, CommitAll, GetLatestPositions) to return ValueTask instead of Task
  • Update Producer: Convert SystemProducer methods (Produce, Flush) to return ValueTask instead of Task
  • Update Delegates: Change interceptor delegate types to use ValueTask for lifecycle events
  • Upgrade Dependencies: Update Surge and all connector packages to version 1.1.1-alpha.1.52
  • Update Tests: Modify FakeConsumer test fixture to implement new ValueTask-based interface

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