diff --git a/pom.xml b/pom.xml index ffd5e69..9e09d2d 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ org.springframework.boot spring-boot-starter-parent - 2.2.7.RELEASE + 2.5.7 com.uci @@ -28,6 +28,10 @@ org.springframework.boot spring-boot-devtools + + org.springframework.boot + spring-boot-starter-validation + org.springframework.boot spring-boot-starter-web-services diff --git a/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java b/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java index 5c5ff4b..e597b44 100644 --- a/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java +++ b/src/main/java/com/uci/outbound/consumers/OutboundKafkaController.java @@ -34,10 +34,12 @@ public class OutboundKafkaController { @EventListener(ApplicationStartedEvent.class) public void onMessage() { + reactiveKafkaReceiver .doOnNext(new Consumer>() { @Override public void accept(ReceiverRecord msg) { + log.info("kafka message receieved"); XMessage currentXmsg = null; try { currentXmsg = XMessageParser.parse(new ByteArrayInputStream(msg.value().getBytes())); @@ -55,8 +57,7 @@ public void accept(XMessage xMessage) { public void accept(XMessageDAO xMessageDAO) { log.info("XMessage Object saved is with sent user ID >> " + xMessageDAO.getUserId()); } - }) - .dispose(); + }); } }); } catch (Exception e) { diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index d208ad7..38fb98d 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -24,6 +24,7 @@ spring.liquibase.enabled=false spring.data.cassandra.contactpoints=${CASSANDRA_URL} spring.data.cassandra.port=${CASSANDRA_PORT} spring.data.cassandra.keyspace-name=${CASSANDRA_KEYSPACE} +spring.data.cassandra.local-datacenter=datacenter1 logging.level.root=INFO spring.data.cassandra.pool.heartbeat-interval=30s spring.data.cassandra.pool.max-queue-size=2000 @@ -40,3 +41,25 @@ netcore.whatsap.auth.token=${NETCORE_WHATSAPP_AUTH_TOKEN} netcore.whatsapp.source=${NETCORE_WHATSAPP_SOURCE} netcore.whatsapp.uri=${NETCORE_WHATSAPP_URI} +spring.r2dbc.url=r2dbc:${FORMS_DB_URL} +postgresql.db.host=${FORMS_DB_HOST} +postgresql.db.port=${FORMS_DB_PORT} +spring.r2dbc.name=${FORMS_DB_NAME} +spring.r2dbc.username=${FORMS_DB_USERNAME} +spring.r2dbc.password=${FORMS_DB_PASSWORD} + +#Caffeine Cache +#caffeine.cache.max.size=${CAFFEINE_CACHE_MAX_SIZE:#{1000}} +caffeine.cache.max.size=0 +caffeine.cache.exprie.duration.seconds=${CAFFEINE_CACHE_EXPIRE_DURATION:#{300}} + +#Opentelemetry Lighstep Config +opentelemetry.lightstep.tracer=${OPENTELEMETERY_LIGHTSTEP_TRACER} +opentelemetry.lightstep.tracer.version=${OPENTELEMETERY_LIGHTSTEP_TRACER_VERSION} +opentelemetry.lightstep.service=${OPENTELEMETERY_LIGHTSTEP_SERVICE} +opentelemetry.lightstep.access.token=${OPENTELEMETERY_LIGHTSTEP_ACCESS_TOKEN} +opentelemetry.lightstep.end.point=${OPENTELEMETERY_LIGHTSTEP_END_POINT} + +#Sunbird Adapater Outbound URL +adapter.sunbird.transport.url=${TRANSPORT_SOCKET_BASE_URL} +