Avatar
Please consider registering
guest
sp_LogInOut Log Insp_Registration Register
Register | Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Feed Topic RSSsp_TopicIcon
Monitor all subscriptions on server side
December 7, 2023
17:57, EET
Avatar
andreas.arnold
New Member
Members
Forum Posts: 1
Member Since:
December 7, 2023
sp_UserOfflineSmall Offline

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

December 8, 2023
10:30, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1045
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

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).

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online: msaala
Guest(s) 40
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 90
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 732
Moderators: 8
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1545
Posts: 6516
Newest Members:
mood edibles, LouieWreve, daniellabdx, janessan21, sammiebeak359, gena7127517, thorstenbouldin, Brett.Rollason, steven014223542, Roberthat
Moderators: Jouni Aro: 1029, Pyry: 1, Petri: 1, Bjarne Boström: 1045, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0, Elias: 0
Administrators: admin: 1