Skip to content

fix: Condition observations not relayed when durableRelay is enabled#177

Open
Pranay265 wants to merge 2 commits into
TrakHound:masterfrom
Pranay265:fix/condition-observations-durable-relay
Open

fix: Condition observations not relayed when durableRelay is enabled#177
Pranay265 wants to merge 2 commits into
TrakHound:masterfrom
Pranay265:fix/condition-observations-durable-relay

Conversation

@Pranay265
Copy link
Copy Markdown
Contributor

When durableRelay: true, the Condition category observations were not getting relayed. the durable condition code path passes raw IObservationOutput objects directly to MTConnectMqttEntityServer.CreateMessage, which requires observations.DataItem.Device to be set. These raw outputs have Device == null , so CreateMessage() returns null → throws → silently swallowed.

@Pranay265
Copy link
Copy Markdown
Contributor Author

Hi @PatrickRitchie

Just following up on this PR. The issue fixed here is critical for our application, and we would greatly appreciate a review when possible. Please let me know if there are any concerns or changes required from our side.

Thanks!

Updated to use existing CloneAsObservation() method.
Copy link
Copy Markdown
Contributor

@PatrickRitchie PatrickRitchie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay in reviewing. There were some changes made to that same method that I needed to pull in first.

I did change the .Select(o => ...) LINQ statement to use the CloneAsObservation() method that was added in a previous commit. This should perform the same way and will make the code easier to maintain.

Thanks for creating a PR and please feel free to create others!

@PatrickRitchie PatrickRitchie moved this from Reviewing to Ready to Merge in MTConnect.NET-Development Jun 4, 2026
@Pranay265
Copy link
Copy Markdown
Contributor Author

Thanks for the update and for reviewing the PR.

Could you let us know when the next release is expected? We need to update our application once a version containing this change is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to Merge

Development

Successfully merging this pull request may close these issues.

2 participants