-
Notifications
You must be signed in to change notification settings - Fork 898
/
connector_converters_test.txt
113 lines (97 loc) · 4.66 KB
/
connector_converters_test.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
curl -i -X PUT -H "Content-Type:application/json" \
http://localhost:8083/connectors/source-rabbitmq-string_converter-00/config \
-d '{
"connector.class" : "io.confluent.connect.rabbitmq.RabbitMQSourceConnector",
"kafka.topic" : "rabbit-test-string-00",
"rabbitmq.queue" : "test-queue-01",
"rabbitmq.username": "guest",
"rabbitmq.password": "guest",
"rabbitmq.host": "rabbitmq",
"rabbitmq.port": "5672",
"rabbitmq.virtual.host": "/",
"confluent.license":"",
"confluent.topic.bootstrap.servers":"kafka:29092",
"confluent.topic.replication.factor":1,
"value.converter": "org.apache.kafka.connect.storage.StringConverter",
"key.converter": "org.apache.kafka.connect.storage.StringConverter"
} '
[B@10c495e9
----
curl -i -X PUT -H "Content-Type:application/json" \
http://localhost:8083/connectors/source-rabbitmq-avro_converter-00/config \
-d '{
"connector.class" : "io.confluent.connect.rabbitmq.RabbitMQSourceConnector",
"kafka.topic" : "rabbit-test-avro-00",
"rabbitmq.queue" : "test-queue-01",
"rabbitmq.username": "guest",
"rabbitmq.password": "guest",
"rabbitmq.host": "rabbitmq",
"rabbitmq.port": "5672",
"rabbitmq.virtual.host": "/",
"confluent.license":"",
"confluent.topic.bootstrap.servers":"kafka:29092",
"confluent.topic.replication.factor":1,
"value.converter": "io.confluent.connect.avro.AvroConverter",
"value.converter.schema.registry.url": "http://schema-registry:8081",
"key.converter": "org.apache.kafka.connect.storage.StringConverter"
} '
"¶\u0001{\"transaction\": \"PAYMENT\", \"amount\": \"$182.3\", \"timestamp\": \"Wed 8 Jan 2020 13:22:19 GMT\" }"
----
curl -i -X PUT -H "Content-Type:application/json" \
http://localhost:8083/connectors/source-rabbitmq-json_converter-00/config \
-d '{
"connector.class" : "io.confluent.connect.rabbitmq.RabbitMQSourceConnector",
"kafka.topic" : "rabbit-test-json-00",
"rabbitmq.queue" : "test-queue-01",
"rabbitmq.username": "guest",
"rabbitmq.password": "guest",
"rabbitmq.host": "rabbitmq",
"rabbitmq.port": "5672",
"rabbitmq.virtual.host": "/",
"confluent.license":"",
"confluent.topic.bootstrap.servers":"kafka:29092",
"confluent.topic.replication.factor":1,
"value.converter" : "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable" : "true",
"key.converter" : "org.apache.kafka.connect.storage.StringConverter"
} '
{"schema":{"type":"bytes","optional":false},"payload":"eyJ0cmFuc2FjdGlvbiI6ICJQQVlNRU5UIiwgImFtb3VudCI6ICIkMTg2LjciLCAidGltZXN0YW1wIjogIldlZCA4IEphbiAyMDIwIDEyOjUzOjI3IEdNVCIgfQ=="}
----
curl -i -X PUT -H "Content-Type:application/json" \
http://localhost:8083/connectors/source-rabbitmq-json_converter-01/config \
-d '{
"connector.class" : "io.confluent.connect.rabbitmq.RabbitMQSourceConnector",
"kafka.topic" : "rabbit-test-json-01",
"rabbitmq.queue" : "test-queue-01",
"rabbitmq.username": "guest",
"rabbitmq.password": "guest",
"rabbitmq.host": "rabbitmq",
"rabbitmq.port": "5672",
"rabbitmq.virtual.host": "/",
"confluent.license":"",
"confluent.topic.bootstrap.servers":"kafka:29092",
"confluent.topic.replication.factor":1,
"value.converter" : "org.apache.kafka.connect.json.JsonConverter",
"value.converter.schemas.enable" : "false",
"key.converter" : "org.apache.kafka.connect.storage.StringConverter"
} '
"eyJ0cmFuc2FjdGlvbiI6ICJQQVlNRU5UIiwgImFtb3VudCI6ICIkNDcuMyIsICJ0aW1lc3RhbXAiOiAiV2VkIDggSmFuIDIwMjAgMTM6MDE6MjEgR01UIiB9"
----
curl -i -X PUT -H "Content-Type:application/json" \
http://localhost:8083/connectors/source-rabbitmq-byte_converter-00/config \
-d '{
"connector.class" : "io.confluent.connect.rabbitmq.RabbitMQSourceConnector",
"kafka.topic" : "rabbit-test-byte-00",
"rabbitmq.queue" : "test-queue-01",
"rabbitmq.username": "guest",
"rabbitmq.password": "guest",
"rabbitmq.host": "rabbitmq",
"rabbitmq.port": "5672",
"rabbitmq.virtual.host": "/",
"confluent.license":"",
"confluent.topic.bootstrap.servers":"kafka:29092",
"confluent.topic.replication.factor":1,
"value.converter": "org.apache.kafka.connect.converters.ByteArrayConverter",
"key.converter": "org.apache.kafka.connect.storage.StringConverter"
} '
{"transaction": "PAYMENT", "amount": "$173.3", "timestamp": "Wed 8 Jan 2020 12:28:49 GMT" }