Skip to content

Instantly share code, notes, and snippets.

View 2013techsmarts's full-sized avatar

Siva Prasad Rao Janapati 2013techsmarts

View GitHub Profile
@2013techsmarts
2013techsmarts / Kafka Connect commands
Last active March 16, 2021 22:38
Kafka Connect commands
#To start the Zookeeper
bin/zookeeper-server-start.sh config/zookeeper.properties
#To start the Kafka broker
/bin/kafka-server-start.sh /config/server.properties
#To start the Kafka connect
/bin/connected-distributed.sh /config/connected-distributed.properties
@2013techsmarts
2013techsmarts / Debezium MySql Source Connector Configuration
Last active March 16, 2021 22:37
Debezium MySql Source Connector Configuration
curl -k -X POST -H "Accept:application/json" -H "Content-Type:application/json" http://localhost:8083/connectors/ -d '{
"name": "mysql-connector-demo",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"database.hostname": "localhost",
"database.port": "3306",
"database.user": "debezium",
"database.password": "dbz",
"database.server.id": "1",
"database.server.name": "dbserver1",
@2013techsmarts
2013techsmarts / Debezium Insert Event
Last active March 16, 2021 22:37
Debezium Insert Event
"payload": {
"before": null,
"after": {
"id": 1016,
"first_name": "Smart",
"last_name": "Techie",
"email": "smarttechie@gmail.com"
},
"source": {
"version": "1.4.2.Final",
@2013techsmarts
2013techsmarts / Debezium Update event
Last active March 16, 2021 22:37
Debezium Update event
"payload": {
"before": {
"id": 1016,
"first_name": "Smart",
"last_name": "Techie",
"email": "smarttechie@gmail.com"
},
"after": {
"id": 1016,
"first_name": "Smart",
@2013techsmarts
2013techsmarts / Debezium Delete event
Last active March 16, 2021 22:37
Debezium Delete event
"payload": {
"before": {
"id": 1016,
"first_name": "Smart",
"last_name": "Techie",
"email": "smarttechie_updated@gmail.com"
},
"after": null,
"source": {
"version": "1.4.2.Final",
docker push docker.io/2013techsmarts/spingboot-demo-buildpacks
docker run -d -p 8080:8080 --name springbootcontainer spingboot-demo-buildpacks:0.0.1-SNAPSHOT
package org.smarttechie.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class DemoController {
@GetMapping
public String hello() {
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>