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

feat: allow subscribe to opcua events BREAKING CHANGE: new input Plugin to subscribe to opcua node_ids and receive their events #16277

Closed

Conversation

frmoschner
Copy link

@frmoschner frmoschner commented Dec 9, 2024

Summary

This Plugin is useful to subscribe to OPC UA node ids to receive upcoming events on the subscribed nodes.

Checklist

  • No AI generated code was used in this PR

Related issues

OPCUA Event Subscription #16275

replaced by #16300

@frmoschner frmoschner changed the title feat(input.opcua.event): Opcus Event Subscription Input Plugin feat: allow subscribe to opcua events BREAKING CHANGE: new input Plugin to subscribe to opcua node_ids and receive their events Dec 9, 2024
@telegraf-tiger telegraf-tiger bot added the feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin label Dec 9, 2024
@frmoschner
Copy link
Author

I run readme_linter and it passes. Why does the Pipeline fail?
What are all the ci/circle tests? Why are they failing on other plugins?

Need help! :)

@srebhan
Copy link
Member

srebhan commented Dec 9, 2024

@frmoschner first of all thank you for your contribution! Let me clarify a few thinks not fully clear to me...

Is there any reason to not fold this into the OPCUA listener plugin? You could easily add event sections there similar to the nodes ones or add event-type filter to the nodes section. Is there anything preventing this?
Having another plugin duplicating large parts of the code is not maintainable in the long-run...

@srebhan srebhan self-assigned this Dec 9, 2024
@frmoschner frmoschner closed this Dec 12, 2024
@frmoschner frmoschner reopened this Dec 12, 2024
@frmoschner frmoschner closed this Dec 12, 2024
@frmoschner
Copy link
Author

Hi @srebhan,

Thank you very much for your reply!
I have adjusted a few things and created a new pull request #16300.
So far OPCUA Polling & Subscribing is separated from each other, and it would make sense at first sight to merge DataChange Subscriptions (opcua_listener) & Event Subscriptions.
However, in my opinion, the new plugin should not be integrated into the Listener plugin, as a plugin always has a task, and the listener_plugin takes care of the processing of DataChangeNotifcations while the new plugin handles EventNotifications. The structure of the subscription is very different and the listener_plugin uses its own subscribeClientConfig to create client and subscription, which cannot be used for my plugin. So if you were to merge the plugins, you would have to differentiate in many places in the code whether the subscription is a DataChange or an event subscription. I think it is much more user-friendly and easier to maintain if the plugins are separated.
I have seen that there is already an opcua client (plugins/common/opcua/client.go), which I am using from now on. I have removed my own client manager. This means there are no more redundancies in the plugins.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants