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

make Acker require Send+Sync, re-export redis connection manager #16

Merged
merged 1 commit into from
Aug 15, 2023

Conversation

svix-onelson
Copy link
Contributor

@svix-onelson svix-onelson commented Aug 14, 2023

While updating bridge to use omniqueue, the usages already in place
work, mostly as-is, with these two changes.

WRT the redis re-export, rust was not able to infer to generic type for
a Producer or Consumer and required that I specify the type for R.
Rather than adding a dep on bb8 in bridge, it would be nicer to just
have it re-exported.

WRT Acker, bridge expected to run a consumer loop then hand each
Delivery off to an async "handler" function. This failed to compile
as-is citing the lack of Send+Sync. Making Acker a supertrait of
Send+Sync was trivial since all the existing implementations were
naturally Send+Sync, so this is probably not controversial.

@svix-onelson svix-onelson changed the title WIP: making changes to help adoption in bridge easier make Acker require Send+Sync, re-export redis connection manager Aug 15, 2023
While updating bridge to use omniqueue, the usages already in place
work, mostly as-is, with these two changes.

WRT the redis re-export, rust was not able to infer to generic type for
a Producer or Consumer and required that I specify the type for `R`.
Rather than adding a dep on bb8 in bridge, it would be nicer to just
have it re-exported.

WRT `Acker`, bridge expected to run a consumer loop then hand each
`Delivery` off to an async "handler" function. This failed to compile
as-is citing the lack of `Send+Sync`. Making `Acker` a supertrait of
`Send+Sync` was trivial since all the existing implementations were
naturally `Send+Sync`, so this is probably not controversial.
@svix-onelson svix-onelson marked this pull request as ready for review August 15, 2023 16:35
@svix-onelson svix-onelson requested a review from a team August 15, 2023 16:35
@svix-onelson svix-onelson merged commit c651841 into main Aug 15, 2023
2 checks passed
@svix-onelson svix-onelson deleted the onelson/bridge-fitting branch August 15, 2023 19:36
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.

2 participants