본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

Confluent Consume 정책 구성 참조

원문 보기 위키 갱신

Confluent Consume 정책 구성 참조 (Confluent Consume Policy Configuration Reference)

이 문서는 Confluent에서 메시지를 소비할 때 사용하는 정책의 구성 옵션을 정리해 둔 참조 자료예요. 메시지 역직렬화 방식이나 오프셋 커밋 전략, DLQ(Dead Letter Queue) 활성화 같은 핵심 설정부터 HTTP GET, Server-Sent Events, WebSocket 같은 동작 모드까지 항목별로 확인할 수 있어요. Kafka 클러스터 식별을 위한 cluster_name과 SASL 인증에 쓰이는 cluster_api_key, cluster_api_secret 같은 보안 관련 필드도 함께 다루니, 정책을 실제로 구성하기 전에 꼭 살펴보세요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "message_deserializer": {
          "type": "string",
          "enum": [
            "json",
            "noop"
          ],
          "description": "The deserializer to use for the consumed messages.",
          "default": "noop"
        },
        "commit_strategy": {
          "type": "string",
          "enum": [
            "auto",
            "off"
          ],
          "description": "The strategy to use for committing offsets.",
          "default": "auto"
        },
        "enable_dlq": {
          "type": "boolean",
          "description": "Enables Dead Letter Queue. When enabled, if the message doesn't conform to the schema (from Schema Registry) or there's an error in the `message_by_lua_functions`, it will be forwarded to `dlq_topic` that can be processed later."
        },
        "mode": {
          "type": "string",
          "enum": [
            "http-get",
            "server-sent-events",
            "websocket"
          ],
          "description": "The mode of operation for the policy.",
          "default": "http-get"
        },
        "timeout": {
          "type": "integer",
          "description": "Socket timeout in milliseconds.",
          "default": 10000
        },
        "security": {
          "type": "object",
          "properties": {
            "ssl_verify": {
              "type": "boolean",
              "description": "Enables verification of the certificate presented by the server.",
              "default": true
            }
          }
        },
        "cluster_name": {
          "type": "string",
          "description": "An identifier for the Kafka cluster. By default, this field generates a random string. You can also set your own custom cluster identifier.  If more than one Kafka policy is configured without a `cluster_name` (that is, if the default autogenerated value is removed), these policies will use the same producer, and by extension, the same cluster. Logs will be sent to the leader of the cluster."
        },
        "cluster_api_key": {
          "type": "string",
          "description": "Username/Apikey for SASL authentication.",
          "x-encrypted": true,
          "x-referenceable": true
        },
        "cluster_api_secret": {
          "type": "string",
          "description": "Password/ApiSecret for SASL authentication.",
          "x-referenceable": true,
          "x-encrypted": true
        },
        "confluent_cloud_api_key": {
          "type": "string",
          "description": "Apikey for authentication with Confluent Cloud. This allows for management tasks such as creating topics, ACLs, etc.",
          "x-referenceable": true,
          "x-encrypted": true
        },
        "bootstrap_servers": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "host": {
                "type": "string",
                "description": "A string representing a host name, such as example.com."
              },
              "port": {
                "type": "integer",
                "maximum": 65535,
                "minimum": 0,
                "description": "An integer representing a port number between 0 and 65535, inclusive."
              }
            },
            "required": [
              "host",
              "port"
            ]
          },
          "description": "Set of bootstrap brokers in a `{host: host, port: port}` list format."
        },
        "topics": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "schema_registry": {
                "type": "object",
                "properties": {
                  "confluent": {
                    "type": "object",
                    "properties": {
                      "authentication": {
                        "type": "object",
                        "properties": {
                          "mode": {
                            "type": "string",
                            "enum": [
                              "basic",
                              "none",
                              "oauth2"
                            ],
                            "description": "Authentication mode to use with the schema registry.",
                            "default": "none"
                          },
                          "basic": {
                            "type": "object",
                            "properties": {
                              "username": {
                                "type": "string",
                                "x-referenceable": true,
                                "x-encrypted": true
                              },
                              "password": {
                                "type": "string",
                                "x-referenceable": true,
                                "x-encrypted": true
                              }
                            },
                            "required": [
                              "password",
                              "username"
                            ]
                          },
                          "oauth2": {
                            "type": "object",
                            "properties": {
                              "token_post_args": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string",
                                  "x-referenceable": true
                                },
                                "description": "Extra post arguments to be passed in the token endpoint request."
                              },
                              "grant_type": {
                                "type": "string",
                                "enum": [
                                  "client_credentials",
                                  "password"
                                ],
                                "description": "The OAuth grant type to be used.",
                                "default": "client_credentials"
                              },
                              "client_id": {
                                "type": "string",
                                "description": "The client ID for the application registration in the IdP.",
                                "x-referenceable": true,
                                "x-encrypted": true
                              },
                              "password": {
                                "type": "string",
                                "description": "The password to use if `config.oauth.grant_type` is set to `password`.",
                                "x-referenceable": true,
                                "x-encrypted": true
                              },
                              "scopes": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "List of scopes to request from the IdP when obtaining a new token.",
                                "default": [
                                  "openid"
                                ]
                              },
                              "token_endpoint": {
                                "type": "string",
                                "description": "The token endpoint URI."
                              },
                              "client_secret": {
                                "type": "string",
                                "description": "The client secret for the application registration in the IdP.",
                                "x-referenceable": true,
                                "x-encrypted": true
                              },
                              "username": {
                                "type": "string",
                                "description": "The username to use if `config.oauth.grant_type` is set to `password`.",
                                "x-referenceable": true,
                                "x-encrypted": true
                              },
                              "audience": {
                                "type": "array",
                                "items": {
                                  "type": "string"
                                },
                                "description": "List of audiences passed to the IdP when obtaining a new token.",
                                "default": []
                              },
                              "token_headers": {
                                "type": "object",
                                "additionalProperties": {
                                  "type": "string",
                                  "x-referenceable": true
                                },
                                "description": "Extra headers to be passed in the token endpoint request."
                              }
                            },
                            "required": [
                              "token_endpoint"
                            ]
                          },
                          "oauth2_client": {
                            "type": "object",
                            "properties": {
                              "auth_method": {
                                "type": "string",
                                "enum": [
                                  "client_secret_basic",
                                  "client_secret_jwt",
                                  "client_secret_post",
                                  "none"
                                ],
                                "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.",
                                "default": "client_secret_post"
                              },
                              "http_version": {
                                "type": "number",
                                "description": "The HTTP version used for requests made by this policy. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.",
                                "default": 1.1
                              },
                              "http_proxy": {
                                "type": "string",
                                "description": "The proxy to use when making HTTP requests to the IdP."
                              },
                              "http_proxy_authorization": {
                                "type": "string",
                                "description": "The `Proxy-Authorization` header value to be used with `http_proxy`."
                              },
                              "https_proxy": {
                                "type": "string",
                                "description": "The proxy to use when making HTTPS requests to the IdP."
                              },
                              "no_proxy": {
                                "type": "string",
                                "description": "A comma-separated list of hosts that should not be proxied."
                              },
                              "client_secret_jwt_alg": {
                                "type": "string",
                                "enum": [
                                  "HS256",
                                  "HS512"
                                ],
                                "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.",
                                "default": "HS512"
                              },
                              "https_proxy_authorization": {
                                "type": "string",
                                "description": "The `Proxy-Authorization` header value to be used with `https_proxy`."
                              },
                              "timeout": {
                                "type": "integer",
                                "maximum": 2147483646,
                                "minimum": 0,
                                "description": "Network I/O timeout for requests to the IdP in milliseconds.",
                                "default": 10000
                              },
                              "keep_alive": {
                                "type": "boolean",
                                "description": "Whether to use keepalive connections to the IdP.",
                                "default": true
                              },
                              "ssl_verify": {
                                "type": "boolean",
                                "description": "Whether to verify the certificate presented by the IdP when using HTTPS.",
                                "default": true
                              }
                            }
                          }
                        }
                      },
                      "url": {
                        "type": "string",
                        "description": "The URL of the schema registry."
                      },
                      "ttl": {
                        "type": "number",
                        "maximum": 3600,
                        "minimum": 0,
                        "description": "The TTL in seconds for the schema registry cache."
                      },
                      "ssl_verify": {
                        "type": "boolean",
                        "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.",
                        "default": true
                      }
                    }
                  }
                },
                "description": "The plugin-global schema registry configuration."
              }
            },
            "required": [
              "name"
            ]
          },
          "minLength": 1,
          "description": "The Kafka topics and their configuration you want to consume from."
        },
        "schema_registry": {
          "type": "object",
          "properties": {
            "confluent": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "description": "The URL of the schema registry."
                },
                "ttl": {
                  "type": "number",
                  "maximum": 3600,
                  "minimum": 0,
                  "description": "The TTL in seconds for the schema registry cache."
                },
                "ssl_verify": {
                  "type": "boolean",
                  "description": "Set to false to disable SSL certificate verification when connecting to the schema registry.",
                  "default": true
                },
                "authentication": {
                  "type": "object",
                  "properties": {
                    "mode": {
                      "type": "string",
                      "enum": [
                        "basic",
                        "none",
                        "oauth2"
                      ],
                      "description": "Authentication mode to use with the schema registry.",
                      "default": "none"
                    },
                    "basic": {
                      "type": "object",
                      "properties": {
                        "username": {
                          "type": "string",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "password": {
                          "type": "string",
                          "x-referenceable": true,
                          "x-encrypted": true
                        }
                      },
                      "required": [
                        "password",
                        "username"
                      ]
                    },
                    "oauth2": {
                      "type": "object",
                      "properties": {
                        "token_endpoint": {
                          "type": "string",
                          "description": "The token endpoint URI."
                        },
                        "token_post_args": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "x-referenceable": true
                          },
                          "description": "Extra post arguments to be passed in the token endpoint request."
                        },
                        "grant_type": {
                          "type": "string",
                          "enum": [
                            "client_credentials",
                            "password"
                          ],
                          "description": "The OAuth grant type to be used.",
                          "default": "client_credentials"
                        },
                        "client_id": {
                          "type": "string",
                          "description": "The client ID for the application registration in the IdP.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "scopes": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of scopes to request from the IdP when obtaining a new token.",
                          "default": [
                            "openid"
                          ]
                        },
                        "audience": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          },
                          "description": "List of audiences passed to the IdP when obtaining a new token.",
                          "default": []
                        },
                        "token_headers": {
                          "type": "object",
                          "additionalProperties": {
                            "type": "string",
                            "x-referenceable": true
                          },
                          "description": "Extra headers to be passed in the token endpoint request."
                        },
                        "client_secret": {
                          "type": "string",
                          "description": "The client secret for the application registration in the IdP.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "username": {
                          "type": "string",
                          "description": "The username to use if `config.oauth.grant_type` is set to `password`.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        },
                        "password": {
                          "type": "string",
                          "description": "The password to use if `config.oauth.grant_type` is set to `password`.",
                          "x-referenceable": true,
                          "x-encrypted": true
                        }
                      },
                      "required": [
                        "token_endpoint"
                      ]
                    },
                    "oauth2_client": {
                      "type": "object",
                      "properties": {
                        "timeout": {
                          "type": "integer",
                          "maximum": 2147483646,
                          "minimum": 0,
                          "description": "Network I/O timeout for requests to the IdP in milliseconds.",
                          "default": 10000
                        },
                        "http_version": {
                          "type": "number",
                          "description": "The HTTP version used for requests made by this policy. Supported values: `1.1` for HTTP 1.1 and `1.0` for HTTP 1.0.",
                          "default": 1.1
                        },
                        "http_proxy": {
                          "type": "string",
                          "description": "The proxy to use when making HTTP requests to the IdP."
                        },
                        "no_proxy": {
                          "type": "string",
                          "description": "A comma-separated list of hosts that should not be proxied."
                        },
                        "keep_alive": {
                          "type": "boolean",
                          "description": "Whether to use keepalive connections to the IdP.",
                          "default": true
                        },
                        "ssl_verify": {
                          "type": "boolean",
                          "description": "Whether to verify the certificate presented by the IdP when using HTTPS.",
                          "default": true
                        },
                        "auth_method": {
                          "type": "string",
                          "enum": [
                            "client_secret_basic",
                            "client_secret_jwt",
                            "client_secret_post",
                            "none"
                          ],
                          "description": "The authentication method used in client requests to the IdP. Supported values are: `client_secret_basic` to send `client_id` and `client_secret` in the `Authorization: Basic` header, `client_secret_post` to send `client_id` and `client_secret` as part of the request body, or `client_secret_jwt` to send a JWT signed with the `client_secret` using the client assertion as part of the body.",
                          "default": "client_secret_post"
                        },
                        "client_secret_jwt_alg": {
                          "type": "string",
                          "enum": [
                            "HS256",
                            "HS512"
                          ],
                          "description": "The algorithm to use with JWT when using `client_secret_jwt` authentication.",
                          "default": "HS512"
                        },
                        "http_proxy_authorization": {
                          "type": "string",
                          "description": "The `Proxy-Authorization` header value to be used with `http_proxy`."
                        },
                        "https_proxy": {
                          "type": "string",
                          "description": "The proxy to use when making HTTPS requests to the IdP."
                        },
                        "https_proxy_authorization": {
                          "type": "string",
                          "description": "The `Proxy-Authorization` header value to be used with `https_proxy`."
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "description": "The plugin-global schema registry configuration."
        },
        "auto_offset_reset": {
          "type": "string",
          "enum": [
            "earliest",
            "latest"
          ],
          "description": "The offset to start from when there is no initial offset in the consumer group.",
          "default": "earliest"
        },
        "keepalive": {
          "type": "integer",
          "description": "Keepalive timeout in milliseconds.",
          "default": 60000
        },
        "enforce_latest_offset_reset": {
          "type": "boolean",
          "description": "When true, 'latest' offset reset behaves correctly (starts from end). When false (default), maintains backwards compatibility where 'latest' acts like 'earliest'.",
          "default": false
        },
        "keepalive_enabled": {
          "type": "boolean",
          "default": false
        },
        "confluent_cloud_api_secret": {
          "type": "string",
          "description": "The corresponding secret for the Confluent Cloud API key.",
          "x-encrypted": true,
          "x-referenceable": true
        },
        "message_by_lua_functions": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "The Lua functions that manipulates the message being sent to the client."
        },
        "dlq_topic": {
          "type": "string",
          "description": "The topic to use for the Dead Letter Queue."
        }
      },
      "required": [
        "cluster_api_key",
        "cluster_api_secret",
        "topics"
      ]
    }
  }
}

더 알아보기 (Learn more)

이 문서에는 원문에서 추출한 별도의 관련 문서 링크가 없어요.