netty-codec-statsd

A pom for deploying to maven central.

License

License

Categories

Categories

Net Netty Networking
GroupId

GroupId

com.github.jcustenborder.netty
ArtifactId

ArtifactId

netty-codec-statsd
Last Version

Last Version

0.1.18
Release Date

Release Date

Type

Type

jar
Description

Description

netty-codec-statsd
A pom for deploying to maven central.
Project URL

Project URL

https://github.com/jcustenborder/netty-codec-statsd
Source Code Management

Source Code Management

https://github.com/jcustenborder/netty-codec-statsd

Download netty-codec-statsd

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.jcustenborder.netty/netty-codec-statsd/ -->
<dependency>
    <groupId>com.github.jcustenborder.netty</groupId>
    <artifactId>netty-codec-statsd</artifactId>
    <version>0.1.18</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.jcustenborder.netty/netty-codec-statsd/
implementation 'com.github.jcustenborder.netty:netty-codec-statsd:0.1.18'
// https://jarcasting.com/artifacts/com.github.jcustenborder.netty/netty-codec-statsd/
implementation ("com.github.jcustenborder.netty:netty-codec-statsd:0.1.18")
'com.github.jcustenborder.netty:netty-codec-statsd:jar:0.1.18'
<dependency org="com.github.jcustenborder.netty" name="netty-codec-statsd" rev="0.1.18">
  <artifact name="netty-codec-statsd" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.jcustenborder.netty', module='netty-codec-statsd', version='0.1.18')
)
libraryDependencies += "com.github.jcustenborder.netty" % "netty-codec-statsd" % "0.1.18"
[com.github.jcustenborder.netty/netty-codec-statsd "0.1.18"]

Dependencies

provided (2)

Group / Artifact Type Version
io.netty : netty-all jar 4.1.6.Final
org.slf4j : slf4j-api jar 1.7.21

test (4)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-all jar 1.10.19
ch.qos.logback : logback-classic jar 1.1.8
org.javassist : javassist jar 3.19.0-GA

Project Modules

There are no modules declared in this project.

Introduction

This project is an implementation of the StatsD protocol for Netty. Currently there is only support for the UDP protocol. More than one entry can be sent by separating each entry with a new line.

Usage

b = new Bootstrap();
b.group(bossGroup)
    .channel(NioDatagramChannel.class)
    .handler(new ChannelInitializer<DatagramChannel>() {
      @Override
      protected void initChannel(DatagramChannel datagramChannel) throws Exception {
        ChannelPipeline channelPipeline = datagramChannel.pipeline();
        channelPipeline.addLast(
            new LoggingHandler("StatsD", LogLevel.TRACE),
            new StatsDRequestDecoder(),
            new StatsDRequestHandler(config, records, time)
        );
      }
    });

Each metric that is found will be passed along in the pipeline.

class StatsDRequestHandler extends SimpleChannelInboundHandler<Metric> {
  @Override
  protected void channelRead0(ChannelHandlerContext channelHandlerContext, Metric metric) throws Exception {
  
  }
}

Versions

Version
0.1.18
0.1.17
0.1.16
0.1.15
0.1.14
0.1.13
0.1.12
0.1.11
0.1.10
0.1.7
0.1.6
0.1.5
0.1.4