Description
Commands are currently based on Context Providers (CPr), sending command requests based on context updates forwarding (based on registrations). This mechanism has a lot of problems, as detailed in this issue.
The same sending of command request can be achieved using custom notifications (based on subscriptions). A subscription is a much more convenient way of sending requests to endpoints, widely used and without any existing important issue.
Once the new commands mechanism get implemented in IoT Agents, the registration API (and associated request forwarding) will be deprecated and eventually removed (that's part of issue #4402). Note that registries are also used to forward queries (out of the scope of the command use case) but this functionality is not actually used in relevant use cases, so its value is small and its deprecation/removal doesn't hurt.