Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace generic broker message type with enum #80

Merged
merged 9 commits into from
Oct 16, 2023

Conversation

mycognosist
Copy link
Owner

The primary change introduced in this PR is the conversion of BrokerMessage from a generic definition (Arc<dyn Any + Send + Sync>) to an enum. While the generic approach is convenient, it requires the message to be downcast each time a match occurs - usually as a reference. The change allows for more compact matching and should also open the door for a refactor of the connection and replication flow (more to come on that in a future PR).

Other minor changes:

  • Replace single variant enums with tuple structs
  • Variable renaming (ie. StoBlobEvent -> StoreBlobEvent etc.)
  • Replace * imports with explicit imports (from broker module)

@mycognosist mycognosist merged commit 731e399 into main Oct 16, 2023
1 check passed
@mycognosist mycognosist deleted the concrete_broker_message branch October 16, 2023 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant