aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/config
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-11-13 16:44:15 -0800
committerAnton Tananaev <anton@traccar.org>2022-11-13 16:44:15 -0800
commit826c661819d044c8f1cf950795ee0f33cc7675c6 (patch)
treeed041c0ee754e732d194dd0ed40efc9166ec17af /src/main/java/org/traccar/config
parent5877cb1b3f1fa7331c4310b9754a3ec442586497 (diff)
downloadtrackermap-server-826c661819d044c8f1cf950795ee0f33cc7675c6.tar.gz
trackermap-server-826c661819d044c8f1cf950795ee0f33cc7675c6.tar.bz2
trackermap-server-826c661819d044c8f1cf950795ee0f33cc7675c6.zip
Implement Kafka forwarding
Diffstat (limited to 'src/main/java/org/traccar/config')
-rw-r--r--src/main/java/org/traccar/config/Keys.java23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java
index b60cd82a0..2224192d9 100644
--- a/src/main/java/org/traccar/config/Keys.java
+++ b/src/main/java/org/traccar/config/Keys.java
@@ -699,6 +699,14 @@ public final class Keys {
"max-age=3600,public");
/**
+ * Position forwarding format. Available options are "url", "json" and "kafka". Default is "url".
+ */
+ public static final ConfigKey<String> FORWARD_TYPE = new StringConfigKey(
+ "forward.type",
+ List.of(KeyType.CONFIG),
+ "url");
+
+ /**
* URL to forward positions. Data is passed through URL parameters. For example, {uniqueId} for device identifier,
* {latitude} and {longitude} for coordinates.
*/
@@ -714,13 +722,6 @@ public final class Keys {
List.of(KeyType.CONFIG));
/**
- * Boolean value to enable forwarding in JSON format.
- */
- public static final ConfigKey<Boolean> FORWARD_JSON = new BooleanConfigKey(
- "forward.json",
- List.of(KeyType.CONFIG));
-
- /**
* Position forwarding retrying enable. When enabled, additional attempts are made to deliver positions. If initial
* delivery fails, because of an unreachable server or an HTTP response different from '2xx', the software waits
* for 'forward.retry.delay' milliseconds to retry delivery. On subsequent failures, this delay is duplicated.
@@ -759,6 +760,14 @@ public final class Keys {
100);
/**
+ * Events forwarding format. Available options are "json" and "kafka". Default is "json".
+ */
+ public static final ConfigKey<String> EVENT_FORWARD_TYPE = new StringConfigKey(
+ "event.forward.type",
+ List.of(KeyType.CONFIG),
+ "json");
+
+ /**
* Events forwarding URL.
*/
public static final ConfigKey<String> EVENT_FORWARD_URL = new StringConfigKey(