Skip to content

Commit eb4cb4d

Browse files
committed
Initial code commit. It's really just a stub at this point to test out the
publishing interface for OpenTSDB. The publishing code is not thread safe.
1 parent cfbdf92 commit eb4cb4d

File tree

4 files changed

+47
-4
lines changed

4 files changed

+47
-4
lines changed

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
INSTALL
2+
Makefile
3+
Makefile.in
4+
aclocal.m4
5+
autom4te.cache
6+
build
7+
target
8+
bin
9+
config.log
10+
config.status
11+
configure
12+
pom.xml

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
opentsdb-rtpub-rabbitmq
2-
=======================
3-
4-
Real Time publishing plugin for OpenTSDB
1+
opentsdb-rtpub-rabbitmq
2+
=======================
3+
4+
Real Time publishing plugin for OpenTSDB
5+
6+
This is just a stub and should NOT be used until it's cleaned up quite a bit.

src/META-INF/MANIFEST.MF

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Manifest-Version: 1.0
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package net.opentsdb.tsd;
2+
3+
import java.util.Map;
4+
5+
import net.opentsdb.utils.Config;
6+
7+
public final class RabbitMQPublisherConfig extends Config {
8+
9+
public RabbitMQPublisherConfig(final Config parent) {
10+
super(parent);
11+
}
12+
13+
@Override
14+
protected void setDefaults() {
15+
16+
default_map.put("tsd.rtpublisher.rabbitmq.hosts", "");
17+
default_map.put("tsd.rtpublisher.rabbitmq.port", "5672");
18+
default_map.put("tsd.rtpublisher.rabbitmq.user", "");
19+
default_map.put("tsd.rtpublisher.rabbitmq.pass", "");
20+
default_map.put("tsd.rtpublisher.rabbitmq.vhost", "opentsdb");
21+
default_map.put("tsd.rtpublisher.rabbitmq.exchange.dps", "datapoints");
22+
23+
for (Map.Entry<String, String> entry : default_map.entrySet()) {
24+
if (!properties.containsKey(entry.getKey()))
25+
properties.put(entry.getKey(), entry.getValue());
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)