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

[Meta] Filebeat mqtt input #15602

Closed
8 of 9 tasks
faec opened this issue Jan 15, 2020 · 4 comments
Closed
8 of 9 tasks

[Meta] Filebeat mqtt input #15602

faec opened this issue Jan 15, 2020 · 4 comments
Assignees
Labels
Filebeat Filebeat Team:Services (Deprecated) Label for the former Integrations-Services team

Comments

@faec
Copy link
Contributor

faec commented Jan 15, 2020

This is a tracking issue for the in-progress MQTT input .

Pending requirements:

@faec faec added the Filebeat Filebeat label Jan 15, 2020
@mtojek
Copy link
Contributor

mtojek commented Jan 16, 2020

I will take a look at ACK handling.

EDIT:

Speaking about sending acknowledgement packets - paho.mqtt.golang should support them out of the box: matchAndDispatch method calls an appropriate handler (if defined) and m.Ack() to confirm handling (https://github.com/eclipse/paho.mqtt.golang/blob/master/router.go#L136). The function body is defined in: https://github.com/eclipse/paho.mqtt.golang/blob/master/net.go#L291 .

I'm not quite sure if the library implementation allows for any modifications (or passing custom ack functions) here. It calls Ack() without checking handler status.

Do you think it's sufficient in this case?

EDIT2:

Agreed offline to implement an end-to-end ACK flow

@mtojek
Copy link
Contributor

mtojek commented Jan 31, 2020

The branch has been rebased and merged (also licensing script has been updated). I'm proceeding with #15982 .

@mtojek mtojek self-assigned this Feb 3, 2020
@mtojek
Copy link
Contributor

mtojek commented Feb 5, 2020

I'm working on the integration test to verify the module.

@tonygunter
Copy link

Why not just allow the handler to call Ack() manually? Hander { unmarshall message -> process message -> forward to next receiver -> ACK}? At this point, the mqtt.Message.Ack() function, wrapping a sync.once.Do function like it does, never actually executes any code except once inside matchAndDispatch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Filebeat Filebeat Team:Services (Deprecated) Label for the former Integrations-Services team
Projects
None yet
Development

No branches or pull requests

4 participants