I am having a hard time to implement the feature where I can have dynamic message value for Kafka. I am using AvroProducer
from confluent-kafka-python
along with schema registry
. The producer will send message in a format like this :
{'id':1, 'name':'A', 'properties': {'key1': 'value1', 'key2': 'value2', 'key2': 'value3'}},
{'id': 2, 'name': 'X', 'properties': {'key1': 'value1'}}
The properties
can vary between messages. So, some might have more key,value pairs while some might have less. And I am trying to get this message from Kafka to postgresql
using kafka connect. I want properties
to be json
type in postgresql
database.
How could this be achieved? Any pointers will be really appreciated. Thanks.