6.6. 设置 Hot Rod 客户端属性

使用 Hot Rod 客户端配置属性指定 Data Grid 主机名和端口、身份验证详情和 TLS 证书。

流程

  1. 创建一个 hotrod-client.properties 文件,其中包含您的 Hot Rod 客户端配置。
  2. hotrod-client.properties 添加到 classpath 中。

6.6.1. OpenShift 上的热备份配置属性

在 OpenShift 上运行的 Hot Rod 客户端的配置属性:

# Connection
infinispan.client.hotrod.server_list=${APPLICATION_NAME}.${SERVICE_NAMESPACE}.svc:11222

# Authentication
infinispan.client.hotrod.use_auth=true
infinispan.client.hotrod.auth_username=${USERNAME}
infinispan.client.hotrod.auth_password=${PASSWORD}
infinispan.client.hotrod.auth_server_name=${APPLICATION_NAME}
infinispan.client.hotrod.sasl_mechanism=DIGEST-MD5
infinispan.client.hotrod.sasl_properties.javax.security.sasl.qop=auth

# Encryption
infinispan.client.hotrod.trust_store_path=/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt