- System Design
cd debezium-transformer
mvn clean install
docker build -t custom-debezium-connect .
docker-compose up -d
curl -X POST \
http://localhost:8083/connectors/ \
-H 'content-type: application/json' \
-d '{
"name": "user-outbox-connector",
"config": {
"connector.class": "io.debezium.connector.postgresql.PostgresConnector",
"tasks.max": "1",
"database.hostname": "postgres",
"database.port": "5432",
"database.user": "tugayesilyurt",
"database.password": "123456",
"database.dbname": "userdb",
"database.server.name": "pg-outbox-server",
"tombstones.on.delete": "false",
"table.whitelist": "public.outbox",
"transforms": "outbox",
"transforms.outbox.type": "com.transform.CustomTransformation"
}
}
@Configuration
public class GmailConfig {
@Bean("gmail")
public JavaMailSender gmailMailSender() {
JavaMailSenderImpl mailSender = new JavaMailSenderImpl();
mailSender.setHost("smtp.gmail.com");
mailSender.setPort(587);
mailSender.setUsername("CHANGE_ME");
mailSender.setPassword("CHANGE_ME");
Properties props = mailSender.getJavaMailProperties();
props.put("mail.transport.protocol", "smtp");
props.put("mail.smtp.auth", "true");
props.put("mail.smtp.starttls.enable", "true");
props.put("mail.debug", "false");
return mailSender;
}
}
cd user-service
mvn spring-boot:run
cd send-email-service
mvn spring-boot:run
Service | EndPoint | Method | Description |
---|---|---|---|
Create User | http://localhost:8080/v1/user | POST | Create User |
- Debezium Connector
- Kafdrop
- Welcome Message