Skip to content
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

mqtt2 MTConnect/Probe/ topic name for agent #385

Open
robot-ranger opened this issue Dec 21, 2023 · 9 comments
Open

mqtt2 MTConnect/Probe/ topic name for agent #385

robot-ranger opened this issue Dec 21, 2023 · 9 comments

Comments

@robot-ranger
Copy link
Contributor

agent device probe topic is prefixed with Agent.

image

is that intentional? what is Agent. in this case? is that unique to the 'agent' device type?

If it is device name - why dont the other devices have topics with the same [name].[uuid] format?

@wsobel
Copy link
Member

wsobel commented Dec 22, 2023 via email

@robot-ranger
Copy link
Contributor Author

robot-ranger commented Dec 22, 2023

ok, right. i was expecting to be able to walk the json to Current/Agent by path instead of by name. if that makes any sense.

since the name is Agent.[uuid] , and uuid is unknown to the client until connect, in order to find the agent, i have to subscribe to MTConnect/Current/# and iteratively inspect each published message for a DeviceStream with name == Agent

...but the owner/operator of the agent COULD have changed the name in agent.cfg...

is the expectation that we do some logical if topic.startsWith('MTConnect/Current/Agent')?

Admittedly this would be abusive on behalf of the owner/operator of the agent, but what if one of the devices' uuid started with 'Agent'? (then the if statement above would be true for more than one device)

Ex: if a device just happens to have a uuid Agent-but-not-agent, then its topic would be MTConnect/Current/Agent-but-not-agent (again; i realize that would ultimately be operator error, im just trying to illustrate the use case for having a name-agnostic path to agent)

@robot-ranger
Copy link
Contributor Author

robot-ranger commented Dec 22, 2023

TLDR - imo, the agent probe and current should be accessible by name-agnostic path to improve the flexibility of client apps.

ETA: it would be nice to be able to subscribe to the agent topics without knowing the name, and be guaranteed i am getting the agent exclusively

@wsobel
Copy link
Member

wsobel commented Dec 22, 2023

Not sure what you mean exactly. Pls give an example.

@robot-ranger
Copy link
Contributor Author

I cant exclusively subscribe to the agent because my client app may not know the agent uuid and therefore does not know the topic string to subscribe to. The only way to "find" the agent is to subscribe to the entire /Probe/+ or /Current/+ topic and inspect each topic. The client apps may not care about ALL of the devices, maybe only wants data from some adapters, but also has a need to reference the agent.

for maximum inter-operability between client apps and cppagent - I propose that the agent should have fixed and common topic strings without uuid, so that any app or adapter can locate and query the agent without knowing uuid

something like MTConnect/Current/Agent/ and MTConnect/Probe/Agent/

Any app or data consumer that wants to further verify the agent by uuid, it still can.

@robot-ranger
Copy link
Contributor Author

i suppose i could unsubscribe... 🤔

@wsobel
Copy link
Member

wsobel commented Dec 24, 2023 via email

@robot-ranger
Copy link
Contributor Author

well... i hadnt thought of that; not something we envisioned in our use cases. But that is a good point..

@wsobel
Copy link
Member

wsobel commented Jun 14, 2024

Is this still an issue? Otherwise I will close.

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

No branches or pull requests

2 participants