Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Subscription not firing. How does the Queue work?

WL_10521300
6-Contributor

Subscription not firing. How does the Queue work?

Hi everyone,

I'm encountering an issue with my subscription in ThingWorx. The subscription is supposed to trigger on a data change event for a property called temperature, but it's not firing as expected. I have already checked the configuration and the DataChange Type is set to "Value".

Additionally, I'm curious about how the queue system works in ThingWorx. Is there a specific table in the database that handles the queue, or is it managed internally? I want to understand if there's any way to monitor or troubleshoot the queue more effectively.

Here's a summary of the issue:

  • Subscription Issue: The subscription for the temperature property data change event is not triggering.

  • Queue System: How does ThingWorx manage the queue? Is it tied to a specific database table, or is it handled internally?

Any insights or suggestions on how to resolve the subscription issue and better understand the queue system would be greatly appreciated!

Thanks in advance for your help.

ACCEPTED SOLUTION

Accepted Solutions

Yes, I had already enable it before and I do not know what happened up but now it works some how.

I was involved in helping on the support ticket for this. I've been told that after adding a logging message inside of the subscription, you started seeing those messages. This points to 2 possibilities : either the subscription's code was not doing what you expected, or the subscription/Thing was not completely saved (pending changes).

can the subscription handle when the property's value change frequently like every second. Or would I have to change the property value to the scan rate to more than a second.

I've heard this is probably related to AMU. As a reminder, officially AMU only supports 1 minute scan rate, lowering it usually works but is at your own risk (especially performance issues).

 

I'm not 100% sure what you're asking though. Do you mean that your scan rate is currently 1 minute, but your tag's value changes faster in Kepware and you want your subscription to trigger every time? If that's what you want, then yes you would need to lower the scan rate : the subscription will fire every time Thingworx would detect a value change, and that can't be faster than the scan rate.

 

If you're asking if it's possible to have subscriptions trigger every second : yes. You may notice that some RTPPM subscriptions are based on 1-second timers, for example. But keep in mind that if you have too many of these, you may impact the performance of processing the subscriptions.

View solution in original post

4 REPLIES 4

Hi

 

A few questions before my week ends : 

 

- How do you feed the property (Temperature) which is referred by the DataChange event? Is it a tag? Do you input the value via code, and if so, what does this line of code look like?

- How can you be sure that the subscription has not fired? Is there a chance it starts but somehow just doesn't do the behaviour that you expect inside the code? Usually to be sure, I add a line of code at the top : logger.error("test");

- Are you 100% sure that you saved your subscription & Thing? I have made that mistakes many times.

Regarding your last point: My most common mistake is that I did not enable the subscription while creating it

nmutter_0-1737468417177.pngnmutter_1-1737468458341.png

 

So also check if the checkmark is there

WL_10521300
6-Contributor
(To:nmutter)

Sorry I accidently accept the solution. Yes, I had already enable it before and I do not know what happened up but now it works some how. Quick question though can the subscription handle when the property's value change frequently like every second. Or would I have to change the property value to the scan rate to more than a second.

 

- Yes is it is a datatag furnace temp data tag.

- I manual excute the code and the it works my loggers show up in my service. And yes i add the logger to the subscription but I don't see that logger in the script log happening. 

- Are you 100% sure that you saved your subscription & Thing? I have made that mistakes many times. - haha I am sure this time. Holger taught me that one as well

Yes, I had already enable it before and I do not know what happened up but now it works some how.

I was involved in helping on the support ticket for this. I've been told that after adding a logging message inside of the subscription, you started seeing those messages. This points to 2 possibilities : either the subscription's code was not doing what you expected, or the subscription/Thing was not completely saved (pending changes).

can the subscription handle when the property's value change frequently like every second. Or would I have to change the property value to the scan rate to more than a second.

I've heard this is probably related to AMU. As a reminder, officially AMU only supports 1 minute scan rate, lowering it usually works but is at your own risk (especially performance issues).

 

I'm not 100% sure what you're asking though. Do you mean that your scan rate is currently 1 minute, but your tag's value changes faster in Kepware and you want your subscription to trigger every time? If that's what you want, then yes you would need to lower the scan rate : the subscription will fire every time Thingworx would detect a value change, and that can't be faster than the scan rate.

 

If you're asking if it's possible to have subscriptions trigger every second : yes. You may notice that some RTPPM subscriptions are based on 1-second timers, for example. But keep in mind that if you have too many of these, you may impact the performance of processing the subscriptions.

Announcements

Top Tags