With this approch, I get error as no matchin function as "rclcpp::SyncParametersClient::SyncParametersClient". Because this is referrence to talker node which is of type composition.
2)add parameter client before adding to the executor:
auto talker = std::make_shared<composition::Talker>();
auto parameter_client = std::make_shared<rclcpp::parameter_client::SyncParametersClient>(talker);
With this approach, not able to set parameters, as parameter_client is define here and set parameter action is getting done in talker_component.cpp.