OPCFoundation / UA-Java-Legacy

This repository is provided by OPC Foundation as legacy support for an Java version for OPC UA.
https://github.com/OPCFoundation/UA-.NETStandard
Other
355 stars 227 forks source link

Is support of publish-subscribe for opc-ua available? #142

Closed amitavabasu closed 6 years ago

amitavabasu commented 6 years ago

Greetings All, <This is not an issue, just a question> Planing to develop an opc-ua client which will subscribe for a state change event of a particular node of an opc-ua server. I found that "ChannelService" class have "CreateSubscription" & "CreateSubscriptionAsync" methods. But I am unable to find any listener class which will listen for the event when published by server. Just wanted to know if we have support for publish-subscribe messaging spec of OPC-UA in the current version of this stack? It seems OPC-UA foundation announced support for this : https://opcfoundation.org/news/opc-foundation-news/opc-foundation-announces-support-of-publish-subscribe-for-opc-ua/

Kindly let me know if any support for publish-subscribe is available in this stack or not. If not available can anyone direct me to a suitable API which I can use?

Thank you in advance -AB

htahvanainen commented 6 years ago

Hi,

Actually, you're describing the normal subscription model used in the Client-Server communication of OPC UA. The publish-subscribe messaging, specification part 14, is a new communication architecture and it's not relevant here.

Please see these previous issues which explain the matter: https://github.com/OPCFoundation/UA-Java/issues/62 https://github.com/OPCFoundation/UA-Java/issues/88

To put it shortly, the OPC UA Java Stack only implements the communication protocol. That is messaging and security. Session and subscription management are application level issues and are not covered by the plain stack. To get full support for subscriptions you need to use an SDK level product or implement the infrastructure yourself, according to the specification.

For more details about OPC UA specification, please see https://opcfoundation.org/developer-tools/specifications-unified-architecture

amitavabasu commented 6 years ago

Thanks, your explanation and provided info helped.