This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.demo.demokafka; | |
| import com.example.demo.demokafka.config.KafkaTestConfig; | |
| import com.example.demo.demokafka.config.PostgresTestConfig; | |
| import com.example.demo.demokafka.core.adapter.db.entity.MyEntity; | |
| import com.example.demo.demokafka.core.adapter.db.repository.MyRepository; | |
| import com.example.demo.demokafka.event.MyEvent; | |
| import com.example.demo.demokafka.utils.KafkaTestUtils; | |
| import com.fasterxml.jackson.databind.ObjectMapper; | |
| import com.github.tomakehurst.wiremock.client.WireMock; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.demo.demokafka.config.kafka; | |
| import jakarta.annotation.Nullable; | |
| import lombok.AllArgsConstructor; | |
| import lombok.extern.slf4j.Slf4j; | |
| import org.apache.kafka.clients.consumer.ConsumerRecord; | |
| import org.apache.kafka.clients.producer.ProducerRecord; | |
| import org.apache.kafka.common.errors.SerializationException; | |
| import org.springframework.kafka.core.KafkaTemplate; | |
| import org.springframework.kafka.listener.ConsumerRecordRecoverer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import jakarta.annotation.PostConstruct; | |
| import lombok.Data; | |
| import org.springframework.beans.factory.annotation.Value; | |
| import org.springframework.boot.autoconfigure.kafka.KafkaProperties; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.kafka.config.ConcurrentKafkaListenerContainerFactory; | |
| import org.springframework.kafka.core.ConsumerFactory; | |
| import org.springframework.kafka.core.DefaultKafkaConsumerFactory; | |
| import org.springframework.kafka.core.DefaultKafkaProducerFactory; | |
| import org.springframework.kafka.core.KafkaTemplate; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Configuration | |
| @ConfigurationProperties(prefix = "app.kafka.my-consumer") | |
| @Getter | |
| @Setter | |
| @EqualsAndHashCode(callSuper = true) | |
| public class MyKafkaConfig extends CommonKafkaConfig<String, SpecificRecord> { | |
| @Autowired | |
| private KafkaProperties kafkaProperties; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "name": "pg-orders-source", | |
| "config": { | |
| "connector.class": "io.debezium.connector.postgresql.PostgresConnector", | |
| "database.hostname": "database", | |
| "database.port": "5432", | |
| "database.user": "demo", | |
| "database.password": "demo", | |
| "database.dbname": "demo", | |
| "database.server.name": "dbserver1", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: '3.8' | |
| services: | |
| database: | |
| image: postgres | |
| ports: | |
| - 5432:5432 | |
| container_name: demo-database | |
| environment: | |
| POSTGRES_DB: demo | |
| POSTGRES_USER: demo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| version: "3" | |
| services: | |
| mongo1: | |
| hostname: mongo1 | |
| container_name: localmongo1 | |
| image: mongo:4.0-xenial | |
| expose: | |
| - 27017 | |
| ports: | |
| - 27011:27017 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Build the app | |
| FROM node:12-alpine as build | |
| WORKDIR /app | |
| COPY package.json package-lock.json ./ | |
| RUN npm install | |
| COPY . . | |
| RUN npm install -g @angular/cli | |
| RUN ng build --prod --output-path=/dist | |
| # Run in NGINX |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| ... | |
| <script src="assets/env.js"></script> | |
| </head> | |
| <body> | |
| <app-root> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const environment = { | |
| apiUrl: window['env']['api'] || null, | |
| gtmScript: `(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | |
| new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | |
| j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | |
| 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | |
| })(window,document,'script','dataLayer', '${window['env']['gtm'] || 'GTM-XXXXXXX'}');` |
NewerOlder