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

Google-pubsub: ACK msgs when acknowledged by publisher #14715

Merged
merged 4 commits into from
Dec 2, 2019

Conversation

adriansr
Copy link
Contributor

Update the google-pubsub input to only ACK received events when an ACK
from the internal publisher is received.

Also removes the Beta label from the input docs.

Closes #13346

@elasticmachine
Copy link
Collaborator

Pinging @elastic/siem (Team:SIEM)

@@ -152,15 +160,11 @@ func (in *pubsubInput) run() error {
// Start receiving messages.
topicID := makeTopicID(in.ProjectID, in.Topic)
return sub.Receive(ctx, func(ctx context.Context, msg *pubsub.Message) {
Copy link
Member

@andrewkroh andrewkroh Nov 22, 2019

Choose a reason for hiding this comment

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

Is there any impact of letting the func return without an Ack/Nack() (is there an impact of not handling the message synchronously in f)? I wonder if it affects the accounting used to track MaxOutstandingMessages/MaxOutstandingBytes. Or if it affects the automatic ACK deadline extension of the message. The docs for Receive aren't 100% clear to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, the docs aren't too clear. My understanding is that it will only affect the ACK deadline if it gets ACK'd at a later time (before re-transmission).

In my tests (against gcloud, not the emulator) a non-ACKed message gets re-delivered eventually after a few minutes. Nack() just causes it to redeliver more quickly.

Update the google-pubsub input to only ACK received events when an ACK
from the internal publisher is received.

Closes elastic#13346
@adriansr
Copy link
Contributor Author

jenkins, test this

Copy link
Member

@andrewkroh andrewkroh left a comment

Choose a reason for hiding this comment

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

LGTM

@adriansr adriansr merged commit 2ec17cc into elastic:master Dec 2, 2019
adriansr added a commit to adriansr/beats that referenced this pull request Jan 16, 2020
Update the google-pubsub input to only ACK received events when an ACK
from the internal publisher is received.

Also removes the Beta label from the input docs.

Closes elastic#13346

(cherry picked from commit 2ec17cc)
adriansr added a commit that referenced this pull request Jan 17, 2020
Update the google-pubsub input to only ACK received events when an ACK
from the internal publisher is received.

Also removes the Beta label from the input docs.

Closes #13346

(cherry picked from commit 2ec17cc)
adriansr added a commit to adriansr/beats that referenced this pull request Jan 17, 2020
Update the google-pubsub input to only ACK received events when an ACK
from the internal publisher is received.

Also removes the Beta label from the input docs.

Closes elastic#13346

(cherry picked from commit 2ec17cc)
adriansr added a commit that referenced this pull request Jan 17, 2020
Update the google-pubsub input to only ACK received events when an ACK
from the internal publisher is received.

Also removes the Beta label from the input docs.

Closes #13346

(cherry picked from commit 2ec17cc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Filebeat] Update Google Pub/Sub Input to wait for publisher ACK
3 participants