@@ -48,6 +48,7 @@ ClientManagerImpl::ClientManagerImpl(std::string resource_namespace, bool with_s
48
48
state_(State::CREATED),
49
49
callback_thread_pool_(absl::make_unique<ThreadPoolImpl>(std::thread::hardware_concurrency())),
50
50
with_ssl_(with_ssl) {
51
+
51
52
certificate_verifier_ = grpc::experimental::ExternalCertificateVerifier::Create<InsecureCertificateVerifier>();
52
53
tls_channel_credential_options_.set_verify_server_certs (false );
53
54
tls_channel_credential_options_.set_check_call_host (false );
@@ -78,7 +79,7 @@ ClientManagerImpl::ClientManagerImpl(std::string resource_namespace, bool with_s
78
79
*/
79
80
channel_arguments_.SetInt (GRPC_ARG_ENABLE_RETRIES, 0 );
80
81
81
- channel_arguments_.SetSslTargetNameOverride (" localhost" );
82
+ // channel_arguments_.SetSslTargetNameOverride("localhost");
82
83
83
84
SPDLOG_INFO (" ClientManager[ResourceNamespace={}] created" , resource_namespace_);
84
85
}
@@ -282,7 +283,7 @@ bool ClientManagerImpl::send(const std::string& target_host,
282
283
SendMessageRequest& request,
283
284
SendResultCallback cb) {
284
285
assert (cb);
285
- SPDLOG_DEBUG (" Prepare to send message to {} asynchronously. Request: {}" , target_host, request.DebugString ());
286
+ SPDLOG_DEBUG (" Prepare to send message to {} asynchronously. Request: {}" , target_host, request.ShortDebugString ());
286
287
RpcClientSharedPtr client = getRpcClient (target_host);
287
288
// Invocation context will be deleted in its onComplete() method.
288
289
auto invocation_context = new InvocationContext<SendMessageResponse>();
@@ -440,7 +441,7 @@ bool ClientManagerImpl::send(const std::string& target_host,
440
441
441
442
case rmq::Code::MESSAGE_PROPERTY_CONFLICT_WITH_TYPE: {
442
443
SPDLOG_WARN (" Message-property-conflict-with-type: Host={}, Response={}" , invocation_context->remote_address ,
443
- invocation_context->response .DebugString ());
444
+ invocation_context->response .ShortDebugString ());
444
445
send_result.ec = ErrorCode::MessagePropertyConflictWithType;
445
446
break ;
446
447
}
@@ -482,7 +483,7 @@ RpcClientSharedPtr ClientManagerImpl::getRpcClient(const std::string& target_hos
482
483
auto search = rpc_clients_.find (target_host);
483
484
if (search == rpc_clients_.end () || !search->second ->ok ()) {
484
485
if (search == rpc_clients_.end ()) {
485
- SPDLOG_INFO (" Create a RPC client to {} " , target_host.data ());
486
+ SPDLOG_INFO (" Create a RPC client to [{}] " , target_host.data ());
486
487
} else if (!search->second ->ok ()) {
487
488
SPDLOG_INFO (" Prior RPC client to {} is not OK. Re-create one" , target_host);
488
489
}
@@ -549,7 +550,7 @@ void ClientManagerImpl::resolveRoute(const std::string& target_host,
549
550
std::chrono::milliseconds timeout,
550
551
const std::function<void (const std::error_code&, const TopicRouteDataPtr&)>& cb) {
551
552
SPDLOG_DEBUG (" Name server connection URL: {}" , target_host);
552
- SPDLOG_DEBUG (" Query route request: {}" , request.DebugString ());
553
+ SPDLOG_DEBUG (" Query route request: {}" , request.ShortDebugString ());
553
554
RpcClientSharedPtr client = getRpcClient (target_host, false );
554
555
if (!client) {
555
556
SPDLOG_WARN (" Failed to create RPC client for name server[host={}]" , target_host);
0 commit comments