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
| 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 |
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
| $ 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" : { |
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
| $ 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" : { |
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
| $ 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" : { |
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
| DELETE FROM STUDENT WHERE ID = 1; |
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
| UPDATE STUDENT SET EMAIL='jill@gmail.com', NAME='Jill' WHERE ID = 1; |
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
| INSERT INTO STUDENT(ID, NAME, ADDRESS, EMAIL) VALUES('1','Jack','Dallas, TX','jack@gmail.com'); |
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
| 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) | |
| ); |
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
| private final Executor executor = Executors.newSingleThreadExecutor(); | |
| ... | |
| @PostConstruct | |
| private void start() { | |
| this.executor.execute(engine); | |
| } | |
| @PreDestroy |
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
| private CDCListener(Configuration studentConnector, StudentService studentService) { | |
| this.engine = EmbeddedEngine | |
| .create() | |
| .using(studentConnector) | |
| .notifying(this::handleEvent).build(); | |
| this.studentService = studentService; | |
| } |
NewerOlder