Hey all,
I'm having a hard time to set the service_config on my server side and have it received by a client. I'm testing it in a small playground project and am currently out of ideas in how to get this working. Rough project setup and findings:
OS: linux, gRPC: v.160, v.1.58
Server:
~~~
const auto serviceConfig = readFile("service_config.json");
builder.AddChannelArgument(GRPC_ARG_SERVICE_CONFIG, *serviceConfig);
Client:
~~~
const auto channel = grpc::CreateChannel(Address.data(), grpc::InsecureChannelCredentials());
std::cout << std::format("Server config: \n{}\n", channel->GetServiceConfigJSON());
Client client(channel);
client.sstream(10);
Client c-ares logs:
[polling resolver 0x55eb2c40a410] request complete
[polling resolver 0x55eb2c40a410] returning result: addresses=<2 addresses>, service_config=<null>
chand=0x55eb2c406d80: got resolver result
chand=0x55eb2c406d80: resolver returned no service config. Using default service config for channel.
chand=0x55eb2c406d80: using service config: "{}"
As to my understanding setting it via GRPC_ARG_SERVICE_CONFIG should be all it
takes. Logs from c-ares look fine in general but it still can't find the service_config. I've been
playing around with various settings but no luck :(
Didn't want to pollute the chat here:
Any help or pointer to an example/test would be greatly appreciated. Maybe i've just not understood something
best,
Dennis