Gitlab - Argos ALM by PALO IT

Implements rabbit mq rather than kafka

parent 81adccda
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-stream-kafka</artifactId> <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
</dependency> </dependency>
<dependency> <dependency>
......
...@@ -31,7 +31,7 @@ public class MeasureRepositoryImpl implements MeasureRepository { ...@@ -31,7 +31,7 @@ public class MeasureRepositoryImpl implements MeasureRepository {
entity.setValue(measure.value()); entity.setValue(measure.value());
MeasureEntity entitySaved = jpaMeasureRepository.save(entity); MeasureEntity entitySaved = jpaMeasureRepository.save(entity);
streamBridge.send("measureProducer", entitySaved); streamBridge.send("measureProducer", entitySaved);
log.info("Publish Message Kafka: {}", entitySaved); log.info("Publish Message Stream: {}", entitySaved);
return new Measure(entitySaved.getDeviceId(), entitySaved.getValue(), return new Measure(entitySaved.getDeviceId(), entitySaved.getValue(),
entitySaved.getDate()); entitySaved.getDate());
} }
......
...@@ -9,4 +9,10 @@ spring.data.mongodb.password=myPasswordMongo21c ...@@ -9,4 +9,10 @@ spring.data.mongodb.password=myPasswordMongo21c
spring.data.mongodb.authentication-database=admin spring.data.mongodb.authentication-database=admin
#Kafka configurations stream #Kafka configurations stream
spring.cloud.stream.kafka.binder.brokers=localhost:9092 #spring.cloud.stream.kafka.binder.brokers=localhost:9092
\ No newline at end of file
# RabbitMQ Configuration
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=user
spring.rabbitmq.password=p@ssword
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment