unacknowledgedMessageCount issue

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
KnightChang
Hero Member
Hero Member
Posts: 32
Joined: 19 Feb 2016, 09:01

unacknowledgedMessageCount issue

Post by KnightChang »

Hi Support Team,
As CTT Test Spec. Base Info Diagnostics --> 008 (or 009)

Description: Invoke a Publish() call and then read ServerDiagnostics.SubscriptionDiagnosticsArray.
Expect result: Service/operation results are `Good`. A data-change notification is received (initial values). The publishRequestCount, dataChangeNotificationsCount, notificationsCount, and unacknowledgedMessageCount increases by 1.

As we monitor the node SubscriptionDiagnosticsArray with UAExpert.
the value unacknowledgedMessageCount doesn't increase in UaCppServer.
But it does increase in Fundation ReferenceServer.
what's wrong with it?

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: unacknowledgedMessageCount issue

Post by Support Team »

Hello KnightChang,

how do you test this?
If you use a client like UaExpert you can't really observe that since the Messages are immediatly Acknowledged.
Best regards
Unified Automation Support Team

KnightChang
Hero Member
Hero Member
Posts: 32
Joined: 19 Feb 2016, 09:01

Re: unacknowledgedMessageCount issue

Post by KnightChang »

Support Team wrote:Hello KnightChang,

how do you test this?
If you use a client like UaExpert you can't really observe that since the Messages are immediatly Acknowledged.
Hi Support Team,

1. open OPC fundation ReferenceServer
2. monitor node Server/ServerDiagnostics/ServerDiagnosticsArray by UaExpert
3. expand SubscrptionDiagnosticsArray

you can find UnacknowledgedMessageCount = 1 in the subitem.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: unacknowledgedMessageCount issue

Post by Support Team »

I see but why do you think the value should be 1?

What happens in the C++ server:
Time -150ms: Server Samples the value for the unacknowledgedMessageCount (count=0)
Time 0ms: Server sends PublishResponse A to the Client and increases the UnacknowledgedMessageCount (count=1)
Time 1ms: Client Receives the PublishResponse A and immediatly sends a new PublishRequest that acknowledges the PublishResponse A
Time 2ms: Server Receives the acknowlegement and decreases the UnacknowledgedMessageCount (count=0)
Time 150ms: Server Samples the value for the unacknowledgedMessageCount (it's still 0)
Best regards
Unified Automation Support Team

KnightChang
Hero Member
Hero Member
Posts: 32
Joined: 19 Feb 2016, 09:01

Re: unacknowledgedMessageCount issue

Post by KnightChang »

Support Team wrote:I see but why do you think the value should be 1?

What happens in the C++ server:
Time -150ms: Server Samples the value for the unacknowledgedMessageCount (count=0)
Time 0ms: Server sends PublishResponse A to the Client and increases the UnacknowledgedMessageCount (count=1)
Time 1ms: Client Receives the PublishResponse A and immediatly sends a new PublishRequest that acknowledges the PublishResponse A
Time 2ms: Server Receives the acknowlegement and decreases the UnacknowledgedMessageCount (count=0)
Time 150ms: Server Samples the value for the unacknowledgedMessageCount (it's still 0)
Dear Support Team,

Because CTT Test profile reporting: Base Info Diagnostics --> 008, it doesn't point out the value unacknowledgedMessageCount should be decreased.
And we can also see the result difference between two servers (uacppserver & ReferenceServer).

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: unacknowledgedMessageCount issue

Post by Support Team »

OPC Specification Part 5:
unacknowledgedMessageCount: The number of unacknowledged messages saved in the republish
queue.
The unacknowledgedMessageCount is decreased whenever a message is acknowledged.
Best regards
Unified Automation Support Team

Post Reply