Skip to content

Commit f49fac7

Browse files
refactor kafka config
1 parent 948c0d4 commit f49fac7

File tree

4 files changed

+6
-82
lines changed

4 files changed

+6
-82
lines changed

.github/workflows/gradle.yml

Lines changed: 0 additions & 73 deletions
This file was deleted.

src/main/kotlin/com/softeno/template/app/kafka/config/KafkaConfig.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ class KafkaConfig {
3232
fun consumerFactory() = DefaultKafkaConsumerFactory<String, JsonNode>(consumerProps)
3333

3434
val consumerProps = mapOf(
35-
ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG to "localhost:9094",
36-
ConsumerConfig.GROUP_ID_CONFIG to "sample-group-jvm-jpa",
3735
ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG to StringDeserializer::class.java,
3836
ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG to JsonDeserializer::class.java,
3937
JsonDeserializer.USE_TYPE_INFO_HEADERS to false,
@@ -46,7 +44,6 @@ class KafkaConfig {
4644
fun producerFactory() = DefaultKafkaProducerFactory<String, KafkaMessage>(senderProps)
4745

4846
val senderProps = mapOf(
49-
ProducerConfig.BOOTSTRAP_SERVERS_CONFIG to "localhost:9094",
5047
ProducerConfig.LINGER_MS_CONFIG to 10,
5148
ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG to StringSerializer::class.java,
5249
ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG to JsonSerializer::class.java

src/main/resources/application.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,17 +44,17 @@ logging.level.org.springframework.jdbc.core.StatementCreatorUtils=TRACE
4444
### keycloak realm config: http://localhost:8090/realms/master/.well-known/openid-configuration
4545
spring.security.oauth2.resourceserver.jwt.issuer-uri=http://localhost:8090/realms/master
4646
spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://localhost:8090/realms/master/protocol/openid-connect/certs
47-
4847
spring.security.oauth2.client.registration.keycloak.client-id=backend
4948
spring.security.oauth2.client.registration.keycloak.client-secret=Jtn7eBkt5hU4E6oNy7iQ2YJPQR8po5oY
5049
spring.security.oauth2.client.registration.keycloak.authorization-grant-type=client_credentials
51-
5250
spring.security.oauth2.client.provider.keycloak.authorization-uri=http://localhost:8090/realms/master/protocol/openid-connect/auth
5351
spring.security.oauth2.client.provider.keycloak.token-uri=http://localhost:8090/realms/master/protocol/openid-connect/token
5452
spring.security.oauth2.client.provider.keycloak.user-info-uri=http://localhost:8090/realms/master/protocol/openid-connect/userinfo
5553
spring.security.oauth2.client.provider.keycloak.jwk-set-uri=http://localhost:8090/realms/master/protocol/openid-connect/certs
5654

5755
# kafka
56+
spring.kafka.bootstrap-servers=localhost:9094
57+
spring.kafka.consumer.group-id=another-group-jvm
5858
spring.kafka.consumer.properties.spring.json.use.type.headers=false
5959
spring.kafka.consumer.properties.spring.json.value.default.type=com.fasterxml.jackson.databind.JsonNode
6060

src/test/resources/application.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ spring.main.allow-bean-definition-overriding=true
22
spring.application.name=SoftenoJpaPostgresApp
33

44
### custom: external services
5-
65
com.softeno.external.url=http://localhost:4500/sample
76
com.softeno.external.name=node-service
87

98
com.softeno.kafka.tx=sample_topic_2
109
com.softeno.kafka.rx=sample_topic_2
1110
com.softeno.kafka.keycloak=keycloak-events
1211

13-
### jpa, hibernate & liquibase
12+
### kafka
13+
spring.kafka.bootstrap-servers=localhost:9094
14+
spring.kafka.consumer.group-id=another-group-jvm
1415

16+
### jpa, hibernate & liquibase
1517
spring.datasource.url=jdbc:tc:postgresql:15.2-alpine:///application
1618
spring.datasource.username=admin
1719
spring.datasource.password=admin
@@ -41,10 +43,8 @@ logging.level.org.springframework.jdbc.core.JdbcTemplate=DEBUG
4143
logging.level.org.springframework.jdbc.core.StatementCreatorUtils=TRACE
4244

4345
# metrics, prometheus & actuator
44-
4546
management.endpoint.metrics.enabled=false
4647
management.endpoint.prometheus.enabled=false
4748

4849
# swagger
49-
5050
springdoc.api-docs.enabled=false

0 commit comments

Comments
 (0)