New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
20 0 0 4

Subscription Liveness - RDP .NET

Hi,

We're using the Refinitiv Data library in a way similar to this example to create a subscription to SQS.

Could you please share the recommended approach to monitor the following aspects:

  • Verifying an active subscription to ensure we continue receiving news.
  • Confirming that the queue is operational and live.

In general, we want a reliable way to verify that our application remains up, active, and consistently delivering news. Any insights or best practices would be much appreciated.

Thank you!

#technologyc#.netrdplseg-data-library
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
Accepted
19.2k 86 39 63

Hi @lukasz.druczak

The GetNextMessage(...) is designed to remove the message from the queue.

Looking deeper, it's worth noting that while the polling appears to be just sitting there waiting for messages to arrive, in reality, within the library it is going through a polling interval, every max N number of seconds. During each poll iteration, this is what can happen:

1730466515936.png

Whether any messages arrive or not, normal operation would return an HTTP OK. In the case where no message are available, the polling internally will wait a max of N seconds, otherwise, will return when messages are available. The default is 20 seconds and this is configurable.

1730466996371.png


1730466515936.png (24.7 KiB)
1730466996371.png (52.7 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
19.2k 86 39 63

Hi @lukasz.druczak

There is no direct mechanism to verify an active subscription or whether the operation is alive other than not receiving any issues when polling or actively retrieving a message. Looking at the underlying AWSSDK, there doesn't appear to be anything specific to what you need.

What I would suggest is to utilize the subscriber.GetNextMessage(...) mechanism, which can potentially be used to provide a continued check on the queue. The health would be determined by a non exception.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
20 0 0 4

Hi @nick.zincone

Thank you.

Could you please let me know if subscriber.GetNextMessage(...) will cause the message to be removed from the queue? And can we use the same subscriber as for

subscriber.StartPollingAsync(...)

Regarding the session, I assume that we can use `OnState` and `OnEvent` to additionally monitor the health of the system?

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @lukasz.druczak

Yes, it is always good to capture the state and event triggers within the session to determine the health of the session throughout the life of your application.

Upvotes
20 0 0 4

Hi @nick.zincone, thank you for your insights.

Can you let me know where you got the reference from in the first screenshot? I can't seem to dig into it.

I can see that `PollAsync` uses `ReceiveMessageAsync`

1730710516090.png


1730710516090.png (138.4 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hi @lukasz.druczak

The specific call to SQSClient?.ReceivedMessageAsync(...) provides the above intellisense, including the exceptions as I outlined. The library is periodically calling this method which should act as a form of status of the queue.

Hi @nick.zincone

Apologies, the screen was suppose to show the intellisense. Maybe your IDE pull some additional documentation?

1730800616689.png


1730800616689.png (272.3 KiB)

Hi @lukasz.druczak

Here is what I'm pulling.

1730846850070.png

Perhaps you may have a different version of the AWSSDK.Core and AWSSDK.SQS packages on your machine.

1730846850070.png (149.5 KiB)

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.