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

Make Partition/Message structures reference a 'static Topic #11

Open
fpacifici opened this issue May 20, 2022 · 0 comments
Open

Make Partition/Message structures reference a 'static Topic #11

fpacifici opened this issue May 20, 2022 · 0 comments
Labels
good first issue Good for newcomers

Comments

@fpacifici
Copy link
Collaborator

Topics are created at the startup of the application and live for its entire duration. We can make this a requirement for the time being. That means that partitions and messages do not need to own an instance of a Topic as they do here https://github.com/getsentry/rust_arroyo/blob/main/src/types/mod.rs#L35.

The current implementation means that every time we create a partition we make a copy of the topic. If we make the lifetime of Topic 'static, we should be able to make Partition reference a Topic instead.

A fancier version would be to still make Partition reference a Topic, but giving it a specific lifetime so that an application can instantiate Topics dynamically, but still tie the lifetime of all partitions to the lifetime of the Topic.

@fpacifici fpacifici added the good first issue Good for newcomers label May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant