File tree Expand file tree Collapse file tree 5 files changed +116
-5
lines changed
Expand file tree Collapse file tree 5 files changed +116
-5
lines changed Original file line number Diff line number Diff line change 33![ Java CI] ( https://github.com/ricardo-ribeiro/SpringBootWebRabbitMQAndKafka/workflows/Java%20CI/badge.svg )
44
55
6+
7+
8+
69# Running Docker Services
710
811``` bash
912cd docker
1013docker-compose up
1114```
1215
16+ # Docker Services
17+
18+
19+ ## [ ADMINER] ( localhost:9999 )
20+
21+ Web Application MYSQL/MariaDB database explorer.
22+ Allows you to run queries and manage your database.
23+
24+ ![ Adminer Image] ( ../master/docs/adminer/Adminer.png )
25+
26+
27+ ## [ RabbitMQ Management Console] ( localhost:15672 )
28+
29+ RabbitMQ Management Console
30+
31+
32+
1333# Running the Application
1434``` bash
1535./gradlew build bootRun
Original file line number Diff line number Diff line change @@ -39,10 +39,10 @@ dependencies {
3939 */
4040 // Enable Spring Data with H2 in mem db
4141 implementation ' org.springframework.boot:spring-boot-starter-data-jpa'
42- /**
43- * Adding H2 In Memory Database For Development
44- */
45- runtime ' com.h2database:h2 '
42+
43+ compile ' org.mariadb.jdbc:mariadb-java-client:2.3.0 '
44+
45+
4646
4747
4848 /**
@@ -58,9 +58,15 @@ dependencies {
5858 * Adding Kafka Cloud Stream Support
5959 */
6060 implementation ' org.springframework.cloud:spring-cloud-starter-stream-kafka'
61-
61+
62+ /**
63+ * Adding H2 In Memory Database For Development
64+ */
65+ testRuntime ' com.h2database:h2'
66+
6267
6368 testImplementation(' org.springframework.boot:spring-boot-starter-test' )
69+ testImplementation(' org.springframework.kafka:spring-kafka-test' )
6470
6571 // Spring Cloud Streams Test
6672 testCompile ' org.springframework.cloud:spring-cloud-stream-test-support'
Original file line number Diff line number Diff line change 44logging.level.root : INFO
55
66spring :
7+ datasource :
8+ url : jdbc:mariadb://localhost:3306/ExampleDatabase
9+ username : root
10+ password : root
11+ driver-class-name : org.mariadb.jdbc.Driver
12+ validationQuery : SELECT 1
713 application :
814 name : ExampleApp
915 h2 :
Original file line number Diff line number Diff line change 1+ server :
2+ port : 5757
3+
4+ logging.level.root : INFO
5+
6+ spring :
7+ datasource :
8+ url : jdbc:h2:mem:testdb
9+ username : root
10+ password : root
11+ driverClassName : org.h2.Driver
12+ validationQuery : SELECT 1
13+ application :
14+ name : ExampleApp
15+ h2 :
16+ console :
17+ enabled : true
18+ cloud :
19+ stream :
20+ defaultBinder : rabbit
21+ bindings :
22+ globalEventsInput :
23+ binder : kafka
24+ destination : global_events
25+ content-type : application/json
26+ group : input-group-1
27+ globalEventsOutput :
28+ binder : kafka
29+ destination : global_events
30+ group : output-group-1
31+ content-type : application/json
32+ paymentsReceived :
33+ binder : rabbit
34+ destination : queue.payment.received
35+ group : payments
36+ paymentValidated :
37+ binder : rabbit
38+ destination : queue.payment.validated
39+ group : payments
40+
41+ binders :
42+ kafka :
43+ type : kafka
44+ environment :
45+ spring.cloud.stream.kafka :
46+ binder :
47+ brokers : localhost
48+ defaultBrokerPort : 9092
49+ bindings :
50+ globalEventsOutput :
51+ producer :
52+ configuration :
53+ key.serializer : org.apache.kafka.common.serialization.StringSerializer
54+ globalEventsInput :
55+ consumer :
56+ configuration :
57+ isolation.level : read_committed # In case of Transactional Produced, Otherwise read_uncommitted
58+ rabbit :
59+ type : rabbit
60+ environment :
61+ spring :
62+ cloud :
63+ stream :
64+ rabbit :
65+ bindings :
66+ paymentsReceived :
67+ consumer :
68+ autoBindDlq : true
69+ requeueRejected : true
70+ republishToDlq : true
71+ paymentValidated :
72+ producer :
73+ autoBindDlq : true
74+ republishToDlq : true
75+ rabbitmq :
76+ host : localhost
77+ port : 5672
78+ username : guest
79+ password : guest
You can’t perform that action at this time.
0 commit comments