Hello @Jaime_Martin_Losa,

My use case is like any other use case which isn’t simple/naïve in terms of the different entities participating in domain.

For example, having a generic “manager” node and several “child” nodes each with a specific implementation, running on different hardware even. Messages have a sender identifier and sometimes target identifier, these must be keys to guarantee durability and reliability.

You wrote “it improves a lot scalability” and I couldn’t agree more, the above scenario MUST use keys. The irony is that most RMWs support keys for years, so ROS2 support for keys shouldn’t be complex since it’s mainly about telling the RMW that specific fields are keys (one bit per field!).

IMHO the ideal solution should be:

@key Identifier sender
@key Identifier target
uint8 mode
...

The RMW will simply handle the distribution internally, most of them are already doing it in non-ROS2 implementations with breeze.

As a workaround, I’m thinking to change typesupport generation to indicate key fields to the RMW by inspecting the field name, for example if the name ends with “_pk” then the “field is key” bit in the RMW will be enabled and the name normalized by removing the suffix. But this might be more complicated than simply supporting the above new .msg format.

Any thoughts?

Thanks!