16:01, EEST
June 21, 2021
Hi,
I have an opc ua server that calculates alarms and triggers events. My opc ua client subscribes to these alarms.
My question is how to act on the subscription parameters : PublishInterval, MaxKeepAliveCount, LifetimeCount
to optimize the processing time between the server and the client ?
Thanks
9:03, EEST
Moderators
February 11, 2020
Hello,
What do you mean with “to optimize the processing time between the server and the client”? PublishInterval, MaxKeepAliveCount, LifetimeCount parameters of a Subscription control how often Notifications are sent to the Client, how often keep-alive messages are sent to the Client when there are no Notifications to send and how long it will take before the Subscription is closed after receiving no Publish requests from the Client.
How to set these parameters depends on what you want to do and there is no single “optimized” way to set them.
If you want to receive Notifications more often, use low PublishInterval. If you want Subscriptions to inform the Clients that are alive often or seldom, use low or high MaxKeepAliveCount respectively. If you want Subscriptions to persist for long even without contact from Client, use high LifetimeCount.
Remember that Servers are allowed to revise these parameters to values they support. For more information, see https://reference.opcfoundation.org/Core/docs/Part4/5.13.1/ and https://reference.opcfoundation.org/Core/docs/Part4/5.13.2/
15:42, EEST
Moderators
February 11, 2020
Hello,
I’m assuming that you’re talking about the time it takes from a Server generating an Alarm to a Client receiving a Notification about this Alarm. In that case, you can try to lower the PublisingInterval to have the Server send Notifications more often. But as mentioned before, Server’s can revise the requested PublisingInterval if the requested value is not supported.
When using lower PublishingIntervals, you should use higher MaxKeepAliveCount and LifetimeCount to avoid the Subscription from timing out too soon or sending keep-alive messages too often.
13:03, EEST
Moderators
February 11, 2020
Hello,
The values you should use for MaxKeepAliveCount and LifetimeCount depend on your application. Their effect on the Subscription has already been explained in earlier posts in this thread. Adjust MaxKeepAliveCount based on how often you wish to receive keep-alive messages and LifetimeCount based on how long it should take before a Subscription should time out.
The default PublishingInterval is 1000 ms, LifeTimeCount is 60 intervals and MaxKeepAliveCount is 20 intervals. Since you have halved the PublishingInterval to 500 ms you could double LifeTimeCount to 120 and MaxKeepAliveCount to 40 to keep the “default durations” for Subscription timing out and for sending keep-alive messages respectively. This is just one suggestion, though. The proper values depend the needs of your application.
Most Users Ever Online: 1919
Currently Online:
10 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: 728
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1529
Posts: 6471
Newest Members:
ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala, efrennowell431, wilfredostuart, caitlynfajardo, jeromechubb7Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0
Administrators: admin: 1