New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Regarding FlatMode Configuration in MTConnect CPP Agent #452
Comments
I don't see the configuration anywhere in the docs. It may have been removed because it did not work properly. @rajwork9 may be able to remember. I would suggest moving to the Mqtt2Service since I am deprecating the MqttService in 2.5. It uses a different methodology to publish. Please also provide more info on what you are trying to do. This can help me address the issue. |
i don't see this option is available with MTConnect CPP Agent 2.3.0.3, in older versions it's called MqttFormatFlat = X value if you don't define then it takes default value as 7. Will: this MqttFormatFlat worked fine but may be during change of concept we missed to add or decided to not to have this option. |
Thank you, @wsobel & @rajwork9 , for your swift responses. Allow me to provide further clarification on our query. Essentially, we are exploring the possibility of standardizing the topic and payload structure across various MTConnect agent implementations, particularly unifying them with respect to the .NET versions. Our aim is to establish a consistent format for both topics and payloads, thereby streamlining data handling. Here is the specific topic and payload structure we aim to achieve, illustrated with the attached screenshot for reference: Topic Structure: Payload Structure: Furthermore, I attempted to utilize Mqtt2Service for the latest versions (2.3.0.3 & 2.5.0.0) as requested. However, I encountered an issue where the payload wasn't received at all. Attached is the agent.cfg file for your reference, along with screenshots of the topic and payload structure. Kindly advise if any steps are missing or if additional information is required for clarity. |
Odd there is no sample topic. It is always there when i test. I'll check on the windows build. |
The payload is the entire document. |
Thank you, @wsobel , for addressing this concern. We eagerly await your insights on the matter. Is it feasible to synchronize the topic structure to match the flattening approach demonstrated in the first screenshot, in conjunction with Mqtt2Service? @rajwork9 , could you kindly provide details on the specific version where MqttFormatFlat = X is operational? Additionally, sharing the agent.cfg file would greatly assist us in understanding the configuration. Thank you. |
The only reason I could find is the machine is idle or disconnected and a sample has not been produced yet. Is this true? If so once the machine connects, a sample should be created. I will log this as a bug since I should immediately produce a sample to create the topic, even if empty. I just want to make sure I'm addressing the right situation. Thanks |
Yes, correct. The machine was in idle state. |
Then I know the issue. I can fix it quite easily. |
Discussed in https://github.com/orgs/mtconnect/discussions/432
Originally posted by Pranay265 April 1, 2024
I am currently working with the MTConnect CPP Agent 2.3.0.3 and have a question regarding the FlatMode configuration option in the agent's agent.cfg file.
I noticed that when I enable or disable FlatMode (e.g., FlatMode = true or FlatMode = false), it doesn't seem to have any effect on the MQTT topic structure generated by the agent. Specifically, I am trying to achieve a flat topic structure like MTConnect/Devices/{deviceuuid}/Observations/{DataItemID}.
Here is an example of my sink configuration in the agent.cfg file:
Sinks {
MqttService {
Server = localhost
Port = 1883
ObservationTopic = MTConnect/Devices/
FlatMode = true
}
}
I expected that enabling FlatMode would flatten the MQTT topic structure, but I haven't observed any change in the topics generated.
Could you please provide some insights into how FlatMode should be correctly configured to achieve a flat topic structure in the MQTT output of the MTConnect CPP Agent? Additionally, are there any specific considerations or dependencies that I should be aware of when using FlatMode?
@wsobel : Any guidance or clarifications on this matter would be greatly appreciated.
The text was updated successfully, but these errors were encountered: