Gitlab - Argos ALM by PALO IT
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
poc-measure-rest
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Luis Eduardo Oviedo Granados
poc-measure-rest
Commits
4a798a27
Commit
4a798a27
authored
Aug 29, 2023
by
José Antonio Herrera Castillo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implements rabbit mq rather than kafka
parent
81adccda
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
pom.xml
pom.xml
+1
-1
src/main/java/com/cardif/pocmeasurerest/infra/repository/MeasureRepositoryImpl.java
...ocmeasurerest/infra/repository/MeasureRepositoryImpl.java
+1
-1
src/main/resources/application-local.properties
src/main/resources/application-local.properties
+7
-1
No files found.
pom.xml
View file @
4a798a27
...
...
@@ -32,7 +32,7 @@
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-stream-
kafka
</artifactId>
<artifactId>
spring-cloud-starter-stream-
rabbit
</artifactId>
</dependency>
<dependency>
...
...
src/main/java/com/cardif/pocmeasurerest/infra/repository/MeasureRepositoryImpl.java
View file @
4a798a27
...
...
@@ -31,7 +31,7 @@ public class MeasureRepositoryImpl implements MeasureRepository {
entity
.
setValue
(
measure
.
value
());
MeasureEntity
entitySaved
=
jpaMeasureRepository
.
save
(
entity
);
streamBridge
.
send
(
"measureProducer"
,
entitySaved
);
log
.
info
(
"Publish Message
Kafka
: {}"
,
entitySaved
);
log
.
info
(
"Publish Message
Stream
: {}"
,
entitySaved
);
return
new
Measure
(
entitySaved
.
getDeviceId
(),
entitySaved
.
getValue
(),
entitySaved
.
getDate
());
}
...
...
src/main/resources/application-local.properties
View file @
4a798a27
...
...
@@ -9,4 +9,10 @@ spring.data.mongodb.password=myPasswordMongo21c
spring.data.mongodb.authentication-database
=
admin
#Kafka configurations stream
spring.cloud.stream.kafka.binder.brokers
=
localhost:9092
\ No newline at end of file
#spring.cloud.stream.kafka.binder.brokers=localhost:9092
# 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment