17:57, EET
December 7, 2023
Hi,
I would like to monitor all sessions and subscriptions of an OPC-UA server. This monitoring should take place because different customers connect with their clients.
The sessions can be read very easily with the following command:
Collection sessions = UaServer.getSessionManager().getSessions();
I have not found such an easy way for the subscriptions.
The current way is via “SubscriptionManagerListener”, i.e. to save subscriptions in a list after they have been created.
However, when the server with the software is restarted, old, previously created subscriptions can be reconnected and these cannot then be recognised via the “SubscriptionManagerListener”.
Is there a way to read out all existing active subscriptions?
Thanks,
Andreas
10:30, EET
April 3, 2012
Hi,
No, but maybe we can add something in the future.
However, the com.prosysopc.ua.server.SubscriptionManager.addListener(SubscriptionManagerListener) way should work, unless I’m missing something here. Just make sure to add it between UaServer.init() (creates SubscriptionManager) and .start() (starts to listen to incoming connections), then you should see all “reconnected subscriptions” adds as well (because clients cannot connect until .start is called). Subscriptions are not persisted over restarts, thus any “reconnected subscription” is a new Subscription as far as the server is concerned and would be notified via com.prosysopc.ua.server.SubscriptionManagerListener.onAddSubscription(ServiceContext, Subscription).
Most Users Ever Online: 1919
Currently Online:
13 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 88
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 731
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
inilarythikibia, rickykennion, PromotionToold, HypromeImpupe, toneylapham544, rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1