This file contains 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
@Entity | |
public class OutboxEvent { | |
@Id | |
@GeneratedValue | |
@Type(type = "uuid-char") | |
private UUID id; | |
@NotNull | |
private String aggregateType; |
This file contains 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
Field | Type | Null | Key | Default | Extra | |
---|---|---|---|---|---|---|
id | varchar(255) | NO | PRI | NULL | ||
aggregate_id | varchar(255) | NO | NULL | |||
aggregate_type | varchar(255) | NO | NULL | |||
payload | longtext | NO | NULL | |||
timestamp | bigint(20) | NO | NULL | |||
type | varchar(255) | NO | NULL |
This file contains 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
public interface Outboxable { | |
/** | |
* The id of the aggregate affected by a given event. This is also used to ensure strict | |
* ordering of events belonging to one and the same aggregate. | |
*/ | |
String getAggregateId(); | |
/** | |
* The type of the aggregate affected by a given event. This needs to be the same type string for all |
This file contains 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": "cosmosdb-sink-sensordata-v1", | |
"config": | |
{ | |
"topics":"sensordata", | |
"connector.class":"at.grahsl.kafka.connect.mongodb.MongoDbSinkConnector", | |
"key.converter":"org.apache.kafka.connect.storage.StringConverter", | |
"key.converter.schemas.enable":false, | |
"value.converter":"org.apache.kafka.connect.json.JsonConverter", | |
"value.converter.schemas.enable":false, | |
"mongodb.connection.uri": "<PUT_YOUR_CONNECTION_STRING_HERE_AND_ADD_DATABASE_NAME>", |
This file contains 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
{ | |
"_id": 1234567, | |
"serialno": "9C:CC:58:8E:42:56", | |
"timestamp": 1549655161262, | |
"locationid": "Location_7682", | |
"gpscoords": { | |
"latitude": 54.45508161071572, | |
"longitude": 31.486299060940382 | |
}, | |
"data": { |
This file contains 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
{"namespace": "at.grahsl.kafka.cosmosdb.blogpost", | |
"type": "record", | |
"name": "SensorsPayload", | |
"fields": [ | |
{"name": "_id", "type": { | |
"type": "long", | |
"arg.properties": { | |
"iteration": { "start": 1234567, "step": 1} | |
} | |
}}, |
This file contains 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 POST \ | |
http://localhost:8083/connectors \ | |
-H 'Content-Type: application/json' \ | |
-d '{ | |
"name": "mdb-sink-cdc-01", | |
"config": { | |
"key.converter":"org.apache.kafka.connect.json.JsonConverter", | |
"key.converter.schemas.enable":true, | |
"value.converter":"org.apache.kafka.connect.json.JsonConverter", | |
"value.converter.schemas.enable":true, |
This file contains 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 POST \ | |
http://localhost:8083/connectors \ | |
-H 'Content-Type: application/json' \ | |
-d '{ | |
"name": "mongodb-replicator-01", | |
"config": { | |
"connector.class": "io.debezium.connector.mongodb.MongoDbConnector", | |
"mongodb.hosts": "config01:27017", | |
"mongodb.name": "example", | |
"collection.whitelist": "blogpost.demo_collA" |
This file contains 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
{ | |
"_id": "10021-2015-ENFO", | |
"certificate_number": 9278806, | |
"business_name": "ATLIXCO DELI GROCERY INC.", | |
"date": "Feb 20 2015", | |
"result": "No Violation Issued", | |
"sector": "Cigarette Retail Dealer - 127", | |
"address": { | |
"city": "RIDGEWOOD", | |
"zip": 11385, |
This file contains 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 POST \ | |
http://localhost:8083/connectors \ | |
-H 'Content-Type: application/json' \ | |
-d '{ "name": "cosmosdb-sink", | |
"config": | |
{ | |
"topics":"dbserver1.inventory.products,dbserver1.inventory.products_on_hand,dbserver1.inventory.customers,dbserver1.inventory.addresses,dbserver1.inventory.orders", | |
"connector.class":"at.grahsl.kafka.connect.mongodb.MongoDbSinkConnector", | |
"key.converter":"org.apache.kafka.connect.json.JsonConverter", | |
"key.converter.schemas.enable":true, |