Skip to content

Instantly share code, notes, and snippets.

Sohan sohangp

Block or report user

Report or block sohangp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View error.java
2019-11-20 12:33:17.901 ERROR 59453 --- [pool-2-thread-1] io.debezium.embedded.EmbeddedEngine : Error while trying to run connector class 'io.debezium.connector.postgresql.PostgresConnector'
Caused by: org.postgresql.util.PSQLException: ERROR: replication slot "debezium" is active for PID <>
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2440) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1116) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.core.v3.QueryExecutorImpl.startCopy(QueryExecutorImpl.java:842) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.core.v3.replication.V3ReplicationProtocol.initializeReplication(V3ReplicationProtocol.java:58) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.core.v3.replication.V3ReplicationProtocol.startLogical(V3ReplicationProtocol.java:42) ~[postgresql-42.2.5.jar:42.2.5]
at org.postgresql.replication.fluent.ReplicationStreamBuilder$1.start(Repl
View delete.bash
$ curl -X GET http://localhost:9200/student/student/1?pretty=true
{
"_index" : "student",
"_type" : "student",
"_id" : "1",
"_version" : 33,
"_seq_no" : 32,
"_primary_term" : 1,
"found" : true,
"_source" : {
View update.bash
$ curl -X GET http://localhost:9200/student/student/1?pretty=true
{
"_index" : "student",
"_type" : "student",
"_id" : "1",
"_version" : 32,
"_seq_no" : 31,
"_primary_term" : 1,
"found" : true,
"_source" : {
View insert.bash
$ curl -X GET http://localhost:9200/student/student/1?pretty=true
{
"_index" : "student",
"_type" : "student",
"_id" : "1",
"_version" : 31,
"_seq_no" : 30,
"_primary_term" : 1,
"found" : true,
"_source" : {
@sohangp
sohangp / delete.sql
Created Nov 19, 2019
DELETE FROM STUDENT
View delete.sql
DELETE FROM STUDENT WHERE ID = 1;
@sohangp
sohangp / update.sql
Created Nov 19, 2019
UPDATE STUDENT
View update.sql
UPDATE STUDENT SET EMAIL='jill@gmail.com', NAME='Jill' WHERE ID = 1;
@sohangp
sohangp / insert.sql
Created Nov 19, 2019
Inserting Data
View insert.sql
INSERT INTO STUDENT(ID, NAME, ADDRESS, EMAIL) VALUES('1','Jack','Dallas, TX','jack@gmail.com');
@sohangp
sohangp / studenttable.sql
Created Nov 19, 2019
Creating the Student Table
View studenttable.sql
CREATE TABLE public.student
(
id integer NOT NULL,
address character varying(255),
email character varying(255),
name character varying(255),
CONSTRAINT student_pkey PRIMARY KEY (id)
);
@sohangp
sohangp / CDCListener.java
Created Nov 19, 2019
Starting the Embedded Engine
View CDCListener.java
private final Executor executor = Executors.newSingleThreadExecutor();
...
@PostConstruct
private void start() {
this.executor.execute(engine);
}
@PreDestroy
@sohangp
sohangp / CDCListener.java
Last active Nov 19, 2019
Creating the EmbeddedEngine
View CDCListener.java
private CDCListener(Configuration studentConnector, StudentService studentService) {
this.engine = EmbeddedEngine
.create()
.using(studentConnector)
.notifying(this::handleEvent).build();
this.studentService = studentService;
}
You can’t perform that action at this time.