Gradle:
compile 'com.tatsuyafw:camel-fluentd:x.y.z'
Maven:
<dependency>
<groupId>com.tatsuyafw</groupId>
<artifactId>camel-fluentd</artifactId>
<version>x.y.z</version>
</dependency>
fluentd:https://hostname[:port]/tag[?options]
The default port number is 24224
- T.B.D.
- T.B.D.
The Component will use the camel message body as a fluentd message body.
The body type must be convertible to Map<String, String>
.
public static void main(String[] args) throws Exception {
CamelContext context = new DefaultCamelContext();
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:fluentd").to("fluentd:https://localhost/sample.tag.foo.bar");
}
});
context.start();
ProducerTemplate producer = context.createProducerTemplate();
Map<String, String> map = new HashMap<String, String>() {
{
put("key", "value");
put("date", "20161025");
}
};
producer.sendBody("direct:fluentd", map);
}
Apache License, Version 2.0