Skip to content

Commit

Permalink
Removed Librato and Dropwizard dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
andsel committed Dec 18, 2024
1 parent 1412997 commit e809f41
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 141 deletions.
14 changes: 0 additions & 14 deletions broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
<version>${netty.version}</version>
</dependency>


<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
Expand All @@ -107,7 +106,6 @@
<classifier>osx-x86_64</classifier>
</dependency>


<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-tcnative-boringssl-static</artifactId>
Expand Down Expand Up @@ -140,7 +138,6 @@
<scope>runtime</scope>
</dependency>


<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2-mvstore</artifactId>
Expand All @@ -153,17 +150,6 @@
<version>2.4.7</version>
</dependency>

<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-core</artifactId>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>io.dropwizard.metrics</groupId>
<artifactId>metrics-jvm</artifactId>
<version>3.2.2</version>
</dependency>

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
Expand Down
5 changes: 0 additions & 5 deletions broker/src/main/java/io/moquette/BrokerConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,6 @@ public final class BrokerConstants {
public static final int NO_BUFFER_FLUSH = -1;
public static final int IMMEDIATE_BUFFER_FLUSH = 0;

public static final String METRICS_ENABLE_PROPERTY_NAME = "use_metrics";
public static final String METRICS_LIBRATO_EMAIL_PROPERTY_NAME = "metrics.librato.email";
public static final String METRICS_LIBRATO_TOKEN_PROPERTY_NAME = "metrics.librato.token";
public static final String METRICS_LIBRATO_SOURCE_PROPERTY_NAME = "metrics.librato.source";

@Deprecated
public static final String ENABLE_TELEMETRY_NAME = IConfig.ENABLE_TELEMETRY_NAME;

Expand Down
13 changes: 0 additions & 13 deletions broker/src/main/java/io/moquette/broker/NewNettyAcceptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ public void operationComplete(ChannelFuture future) throws Exception {
private final Map<String, Integer> ports = new HashMap<>();
private BytesMetricsCollector bytesMetricsCollector = new BytesMetricsCollector();
private MessageMetricsCollector metricsCollector = new MessageMetricsCollector();
private Optional<? extends ChannelInboundHandler> metrics;

private int nettySoBacklog;
private boolean nettySoReuseaddr;
Expand Down Expand Up @@ -172,15 +171,6 @@ public void initialize(NewNettyMQTTHandler mqttHandler, IConfig props, ISslConte
channelClass = NioServerSocketChannel.class;
}

final boolean useFineMetrics = props.boolProp(METRICS_ENABLE_PROPERTY_NAME, false);
if (useFineMetrics) {
DropWizardMetricsHandler metricsHandler = new DropWizardMetricsHandler();
metricsHandler.init(props);
this.metrics = Optional.of(metricsHandler);
} else {
this.metrics = Optional.empty();
}

initializePlainTCPTransport(mqttHandler, props, brokerConfiguration);
initializeWebSocketTransport(mqttHandler, props, brokerConfiguration);
if (securityPortsConfigured(props)) {
Expand Down Expand Up @@ -286,9 +276,6 @@ private void configureMQTTPipeline(ChannelPipeline pipeline, MoquetteIdleTimeout
pipeline.addLast("encoder", MqttEncoder.INSTANCE);
pipeline.addLast("metrics", new MessageMetricsHandler(metricsCollector));
pipeline.addLast("messageLogger", new MQTTMessageLogger());
if (metrics.isPresent()) {
pipeline.addLast("wizardMetrics", metrics.get());
}
pipeline.addLast("handler", handler);
}

Expand Down

This file was deleted.

14 changes: 0 additions & 14 deletions distribution/src/main/resources/moquette.conf
Original file line number Diff line number Diff line change
Expand Up @@ -153,20 +153,6 @@ password_file config/password_file.conf
#*********************************************************************
# session_queue_size 1024

#*********************************************************************
# Metrics Configuration
#
# use_metrics: used to enable Dropwizard Metrics sampling metrics.
# metrics.librato.email: Librato account's email
# metrics.librato.token: Librato account's security token
# metrics.librato.source: your application as source in Librato
# definitions
#*********************************************************************
# use_metrics true
# metrics.librato.email [email protected]
# metrics.librato.token sdfergheghliuhyr2283ehd9827398h
# metrics.librato.source My Fantastic Service

#*********************************************************************
# Telemetry information sending
#
Expand Down

0 comments on commit e809f41

Please sign in to comment.