Skip to content

Commit

Permalink
[eclipse-hono#3647] Prometheus based limits check uses always port 9090
Browse files Browse the repository at this point in the history
  • Loading branch information
harism committed Jun 19, 2024
1 parent c3ce2da commit 699035e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,14 @@ public interface PrometheusBasedResourceLimitCheckOptions {
*/
@WithDefault("1000")
int connectTimeout();

/**
* Gets the TCP port of the server that this client is configured to connect to.
* <p>
* The default value of this property is 9090.
*
* @return The port number.
*/
@WithDefault("9090")
int port();
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2021 Contributors to the Eclipse Foundation
* Copyright (c) 2019 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand All @@ -10,6 +10,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*******************************************************************************/

package org.eclipse.hono.adapter.resourcelimits;

import org.eclipse.hono.client.amqp.config.AuthenticatingClientConfigProperties;
Expand Down Expand Up @@ -68,7 +69,7 @@ public PrometheusBasedResourceLimitChecksConfig() {
*/
public PrometheusBasedResourceLimitChecksConfig(final PrometheusBasedResourceLimitCheckOptions options) {
super(options.clientOptions());
setPort(9090);
setPort(options.port());
this.cacheMaxSize = options.cacheMaxSize();
this.cacheMinSize = options.cacheMinSize();
this.cacheTimeout = options.cacheTimeout();
Expand Down

0 comments on commit 699035e

Please sign in to comment.