-
Notifications
You must be signed in to change notification settings - Fork 43
[ingress] introduce buffer queue #8
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
Conversation
84848ee to
93aa32e
Compare
93aa32e to
194ab63
Compare
danyalprout
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, lets also update the docker-compose file here to add a new topic (tips-ingress) or something
| pub async fn enqueue_bundle( | ||
| &self, | ||
| bundle: &EthSendBundle, | ||
| sender: Address, | ||
| ) -> Result<(), Error> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add some retry logic with a backoff to this function? Maybe we can pull in this crate:
| .with_min_delay(Duration::from_millis(100)) | ||
| .with_max_delay(Duration::from_secs(5)) | ||
| .with_max_times(3), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could tune these params later?
| command: | | ||
| sh -c " | ||
| kafka-topics --create --if-not-exists --topic tips-audit --bootstrap-server kafka:29092 --partitions 3 --replication-factor 1 | ||
| kafka-topics --create --if-not-exists --topic tips-ingress --bootstrap-server kafka:29092 --partitions 3 --replication-factor 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a retention policy (time or size based)?
754cac1 to
b83a8ed
Compare
Overview
Add a queue to buffer transactions before writing to hot database.
This will allow the DB Writer to be a consumer of this queue and then be able to
insert_bundleto datastore.Tests
TODO