Avatar

Please consider registering
guest

sp_LogInOut Log In sp_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 RSS sp_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: 1026
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:
64 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: 737

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1524

Posts: 6450

Newest Members:

fannielima, kristiewinkle8, rust, christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0

Administrators: admin: 1