From 23a46b4be35277e06ec89f48730eeb694e686be8 Mon Sep 17 00:00:00 2001
From: Kenmegne <stephanie.kenmegne@gmail.com>
Date: Thu, 18 Jun 2026 15:40:06 +0000
Subject: [PATCH] add fdx-commons and fdx-consultation

---
 apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/routes/in/UserActionsRoute.java |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 45 insertions(+), 0 deletions(-)

diff --git a/apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/routes/in/UserActionsRoute.java b/apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/routes/in/UserActionsRoute.java
new file mode 100644
index 0000000..3be7d10
--- /dev/null
+++ b/apifdxweb/api/apifdxweb-service-impl/src/main/java/com/megatim/apifdxweb/service/impl/camel/routes/in/UserActionsRoute.java
@@ -0,0 +1,45 @@
+package com.megatim.apifdxweb.service.impl.camel.routes.in;
+
+import com.megatim.apifdxweb.service.impl.camel.consumers.UserActionLogConsumer;
+import com.megatim.apifdxweb.tools.AppContext;
+import com.megatim.fdxcommons.model.log.UserActionLog;
+import com.megatim.fdxcommons.tools.resolvers.JacksonMapperFormat;
+import javax.enterprise.context.ApplicationScoped;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ *
+ * @author ASUS
+ */
+@ApplicationScoped
+public class UserActionsRoute extends RouteBuilder {
+
+    @Override
+    public void configure() throws Exception {
+
+        from("direct:" + AppContext.API_USER_ACTION_DIRECT)
+                .marshal(JacksonMapperFormat.jacksonDataFormat(UserActionLog.class))
+                .to("rabbitmq:"
+                        + AppContext.API_USER_ACTION_EXCHANGE
+                        + "?queue=" + AppContext.API_USER_ACTION_QUEUE
+                        + "&routingKey=" + AppContext.API_USER_ACTION_ROUTING_KEY
+                        + "&autoDelete=false");
+
+        from("rabbitmq:"
+                + AppContext.API_USER_ACTION_EXCHANGE
+                + "?queue=" + AppContext.API_USER_ACTION_QUEUE
+                + "&routingKey=" + AppContext.API_USER_ACTION_ROUTING_KEY
+                + "&autoDelete=false")
+                .unmarshal(JacksonMapperFormat.jacksonDataFormat(UserActionLog.class))
+                .bean(UserActionLogConsumer.class);
+
+        from("direct:" + com.megatim.fdxcommons.tools.context.AppContext.USER_ACTION_TO_FDX_CONS_DIRECT)
+                .marshal(JacksonMapperFormat.jacksonDataFormat(UserActionLog.class))
+                .to("rabbitmq:"
+                        + com.megatim.fdxcommons.tools.context.AppContext.USER_ACTION_TO_FDX_CONS_EXCHANGE
+                        + "?queue=" + com.megatim.fdxcommons.tools.context.AppContext.USER_ACTION_TO_FDX_CONS_QUEUE
+                        + "&routingKey=" + com.megatim.fdxcommons.tools.context.AppContext.USER_ACTION_TO_FDX_CONS_ROUTING_KEY
+                        + "&autoDelete=false");
+
+    }
+}

--
Gitblit v1.10.0