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: 518
Currently Online:
10 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
hbrackel: 135
pramanj: 86
Francesco Zambon: 81
rocket science: 77
Ibrahim: 76
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
TimK: 41
Member Stats:
Guest Posters: 0
Members: 683
Moderators: 16
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1467
Posts: 6261
Newest Members:
digitechroshni, LouieWreve, Kickbiche, karrimacvitie5, graciela2073, sagarchau, elviralangwell4, Donnavek, Eddiefauth, DonaldPoomaModerators: Jouni Aro: 1010, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5
Administrators: admin: 1