aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/MainModule.java
diff options
context:
space:
mode:
authorRodolfo Silva <contato@rodolfosilva.com>2023-07-13 14:26:34 -0300
committerRodolfo Silva <contato@rodolfosilva.com>2023-07-13 15:05:37 -0300
commitbd64dc0bc759e8325f09686909c25f3a08fbf686 (patch)
tree47c13829b922c022a1ab89dc78449ec22c91b2db /src/main/java/org/traccar/MainModule.java
parent2be2a4558ace9825a69aecf6329305490eb5fe5e (diff)
downloadtrackermap-server-bd64dc0bc759e8325f09686909c25f3a08fbf686.tar.gz
trackermap-server-bd64dc0bc759e8325f09686909c25f3a08fbf686.tar.bz2
trackermap-server-bd64dc0bc759e8325f09686909c25f3a08fbf686.zip
AMQP Forwarder
Add support to forward events and positions to AMQP (RabbitMQ).
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r--src/main/java/org/traccar/MainModule.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java
index b7bdbc6bf..f5db75846 100644
--- a/src/main/java/org/traccar/MainModule.java
+++ b/src/main/java/org/traccar/MainModule.java
@@ -37,10 +37,12 @@ import org.traccar.database.OpenIdProvider;
import org.traccar.database.StatisticsManager;
import org.traccar.forward.EventForwarder;
import org.traccar.forward.EventForwarderJson;
+import org.traccar.forward.EventForwarderAmqp;
import org.traccar.forward.EventForwarderKafka;
import org.traccar.forward.EventForwarderMqtt;
import org.traccar.forward.PositionForwarder;
import org.traccar.forward.PositionForwarderJson;
+import org.traccar.forward.PositionForwarderAmqp;
import org.traccar.forward.PositionForwarderKafka;
import org.traccar.forward.PositionForwarderRedis;
import org.traccar.forward.PositionForwarderUrl;
@@ -360,6 +362,8 @@ public class MainModule extends AbstractModule {
if (config.hasKey(Keys.EVENT_FORWARD_URL)) {
String forwardType = config.getString(Keys.EVENT_FORWARD_TYPE);
switch (forwardType) {
+ case "amqp":
+ return new EventForwarderAmqp(config, objectMapper);
case "kafka":
return new EventForwarderKafka(config, objectMapper);
case "mqtt":
@@ -379,6 +383,8 @@ public class MainModule extends AbstractModule {
switch (config.getString(Keys.FORWARD_TYPE)) {
case "json":
return new PositionForwarderJson(config, client, objectMapper);
+ case "amqp":
+ return new PositionForwarderAmqp(config, objectMapper);
case "kafka":
return new PositionForwarderKafka(config, objectMapper);
case "redis":