Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Revisit the way all simple types are passed around. #3

Open
fpacifici opened this issue Apr 21, 2022 · 0 comments
Open

Revisit the way all simple types are passed around. #3

fpacifici opened this issue Apr 21, 2022 · 0 comments

Comments

@fpacifici
Copy link
Collaborator

The simple types: Topic, Partition, Position are all cloned when being moved around the different layers of the library.
This is mostly not useful. Topics should have a static lifetime and passed by reference, Partition and Position should be owned by a consumer between one assignment and another and really may need to be cloned only when returning a message.

This means revisiting all the places where we pass and receive those structs and consider passing only references around instead of copying everything.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant