Skip to content

Commit

Permalink
Merge branch 'release-4.6.0' of https://github.com/samagra-comms/outb…
Browse files Browse the repository at this point in the history
…ound into hotflix-kafka-v-1
  • Loading branch information
surabhi-mahawar committed Feb 11, 2022
2 parents 103f9da + a74dd5e commit 7c34862
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
6 changes: 5 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.7.RELEASE</version>
<version>2.5.7</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.uci</groupId>
Expand All @@ -28,6 +28,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web-services</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ public class OutboundKafkaController {

@EventListener(ApplicationStartedEvent.class)
public void onMessage() {

reactiveKafkaReceiver
.doOnNext(new Consumer<ReceiverRecord<String, String>>() {
@Override
public void accept(ReceiverRecord<String, String> msg) {
log.info("kafka message receieved");
XMessage currentXmsg = null;
try {
currentXmsg = XMessageParser.parse(new ByteArrayInputStream(msg.value().getBytes()));
Expand All @@ -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) {
Expand Down
23 changes: 23 additions & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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}

0 comments on commit 7c34862

Please sign in to comment.