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

Rework push consumer heartbeats handling #1048

Merged
merged 4 commits into from
Jul 24, 2023
Merged

Conversation

Jarema
Copy link
Member

@Jarema Jarema commented Jul 21, 2023

No description provided.

@Jarema Jarema force-pushed the push-ordered-heartbeats-fix branch from b23de53 to 3a94703 Compare July 21, 2023 17:32
@caspervonb caspervonb self-requested a review July 22, 2023 10:21
@Jarema Jarema marked this pull request as ready for review July 23, 2023 08:36
Copy link
Collaborator

@caspervonb caspervonb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit but gonna lgtm

@@ -625,7 +643,7 @@ impl<'a> futures::Stream for Ordered<'a> {
match subscriber.receiver.poll_recv(cx) {
Poll::Ready(maybe_message) => match maybe_message {
Some(message) => {
*self.last_seen.lock().unwrap() = Instant::now();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for no locks.

@@ -41,7 +41,6 @@ mod jetstream {
use async_nats::jetstream::stream::{self, DiscardPolicy, StorageType};
use async_nats::jetstream::AckKind;
use async_nats::ConnectOptions;
use bytes::Bytes;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Churn.

@Jarema Jarema merged commit 516c40a into main Jul 24, 2023
13 checks passed
@Jarema Jarema deleted the push-ordered-heartbeats-fix branch July 24, 2023 07:08
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