Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class ProxyConfig implements ConfigFile {
private boolean tlsTestModeEnable = true;
private String tlsKeyPath = ConfigurationManager.getProxyHome() + "/conf/tls/rocketmq.key";
private String tlsCertPath = ConfigurationManager.getProxyHome() + "/conf/tls/rocketmq.crt";
private int tlsCertWatchIntervalMs = 60 * 60 * 1000; // 1 hour
/**
* gRPC
*/
Expand Down Expand Up @@ -325,6 +326,14 @@ public void parseDelayLevel() {
}
}

public int getTlsCertWatchIntervalMs() {
return tlsCertWatchIntervalMs;
}

public void setTlsCertWatchIntervalMs(int tlsCertWatchIntervalMs) {
this.tlsCertWatchIntervalMs = tlsCertWatchIntervalMs;
}

public String getRocketMQClusterName() {
return rocketMQClusterName;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/
package org.apache.rocketmq.proxy.service.cert;

import org.apache.rocketmq.common.constant.LoggerName;
import org.apache.rocketmq.common.utils.StartAndShutdown;
import org.apache.rocketmq.logging.org.slf4j.Logger;
Expand All @@ -39,7 +40,7 @@ public TlsCertificateManager() {
ConfigurationManager.getProxyConfig().getTlsKeyPath()
},
new CertKeyFileWatchListener(),
60 * 60 * 1000 /* 1 hour */
ConfigurationManager.getProxyConfig().getTlsCertWatchIntervalMs()
);
} catch (Exception e) {
log.error("Failed to initialize TLS certificate watch service", e);
Expand Down Expand Up @@ -107,7 +108,7 @@ private void notifyContextReload() {
for (TlsContextReloadListener listener : reloadListeners) {
try {
listener.onTlsContextReload();
} catch (Exception e) {
} catch (Throwable e) {
log.error("Failed to notify TLS context reload to listener: " + listener, e);
}
}
Expand Down
Loading