MQTT retain flag for chunked UADP metadata messages|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
MQTT retain flag for chunked UADP metadata messages
Avatar
Christian Winter
Member
Members
Forum Posts: 6
Member Since:
07/03/2020
sp_UserOfflineSmall Offline
1
06/23/2021 - 06:53
sp_Permalink sp_Print

The MQTT transport mapping for OPC UA PubSub (https://reference.opcfoundatio…..t14/7.3.5/) specifies that the MQTT retain flag shall be set for metadata messages (and it must not be set for any other messages). The rationale behind this is that a newly connected client immediately receives the metadata it needs for understanding the datasets being sent.

However, this does not work anymore if the metadata message is chunked (UADP message mapping) because MQTT brokers retain only one MQTT message per topic meaning that only the latest message with retain flag set will be delivered to clients and earlier retained messages are discarded. Hence the client will only receive the last retained chunk of the metadata message, but not the complete metadata message.

Did I miss anything in the specification that counters this problem? Is there any workaround available?

Avatar
Randy Armstrong
Admin
Forum Posts: 1579
Member Since:
05/30/2017
sp_UserOfflineSmall Offline
2
06/23/2021 - 09:10
sp_Permalink sp_Print

The RETAIN flag can be set on any message in the 1.05 RC.

Not sure why that restriction was added to 1.04.

The assumption is the MaxMessageSize must be large enough to not require chunking because of the issues you raise.

If that is not enough the set the MetaDataUpdateTime to rate fast enough for your application:

https://reference.opcfoundatio…..2/#9.3.2.3

Avatar
Christian Winter
Member
Members
Forum Posts: 6
Member Since:
07/03/2020
sp_UserOfflineSmall Offline
3
06/23/2021 - 09:28
sp_Permalink sp_Print sp_EditHistory

Thank you Randy Armstrong for all hints!

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 53
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1445
Posts: 4889