in the new schema has no default value and is missing in the old schema

2025. 3. 14. 15:41k8s/Kafka

신규 컬럼 추가시, 과거 자료를 위해서 default값 지정 필요

{
  "type": "record",
  "name": "TEST",
  "namespace": "com.example.kafka",
  "fields": [
    { "name": "a", "type": "int" },
    { "name": "b", "type": "string" },
    { "name": "c", "type": "string" },
    { "name": "ip", "type": "string", "default": "" },  // ✅ Add default
    { "name": "xforwardedfor", "type": "string", "default": "" },  // ✅ Add default
    { "name": "jsessionid", "type": "string", "default": "" }  // ✅ Add default
  ]
}