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

Solace Consume Policy 구성 참조

원문 보기 위키 갱신

Solace Consume Policy 구성 참조 (Solace Consume Policy Configuration Reference)

이 문서는 Kong에서 Solace 이벤트 브로커로 메시지를 소비할 때 적용되는 Consume Policy의 구성 옵션을 JSON 스키마 형태로 정리한 참조 자료예요. 메시지에 타임스탬프나 발신자 ID를 자동으로 추가하는 세션 설정부터, BASIC과 OAUTH2 방식의 인증에 필요한 사용자 이름, 비밀번호, 액세스 토큰 같은 필드까지 하나씩 소개하고 있어요. 각 필드의 데이터 타입, 기본값, 암호화 여부 같은 세부 정보가 함께 표시되어 있어서 실제 정책 설정 파일을 작성할 때 그대로 참고할 수 있어요

출처: 문서

본문

{
  "properties": {
    "config": {
      "type": "object",
      "properties": {
        "session": {
          "type": "object",
          "properties": {
            "generate_send_timestamps": {
              "type": "boolean",
              "description": "When enabled, a send timestamp is automatically included (if not already present) in the Solace-defined fields for each message sent.",
              "default": true
            },
            "generate_sender_id": {
              "type": "boolean",
              "description": "When enabled, a sender id is automatically included (if not already present) in the Solace-defined fields for each message sent.",
              "default": true
            },
            "authentication": {
              "type": "object",
              "properties": {
                "username": {
                  "type": "string",
                  "maxLength": 189,
                  "description": "The username used with `BASIC` authentication scheme when connecting to an event broker.",
                  "x-referenceable": true,
                  "x-encrypted": true
                },
                "password": {
                  "type": "string",
                  "maxLength": 128,
                  "description": "The password used with `BASIC` authentication scheme when connecting to an event broker.",
                  "x-referenceable": true,
                  "x-encrypted": true
                },
                "basic_auth_header": {
                  "type": "string",
                  "description": "Specifies the header that contains Basic Authentication credentials for the `BASIC` authentication scheme when connecting to an event broker. This header takes precedence over the `username` and `password` fields."
                },
                "access_token": {
                  "type": "string",
                  "description": "The OAuth2 access token used with `OAUTH2` authentication scheme when connecting to an event broker.",
                  "x-referenceable": true,
                  "x-encrypted": true
                },
                "access_token_header": {
                  "type": "string",
                  "description": "Specifies the header that contains access token for the `OAUTH2` authentication scheme when connecting to an event broker. This header takes precedence over the `access_token` field."
                },
                "id_token": {
                  "type": "string",
                  "description": "The OpenID Connect ID token used with `OAUTH2` authentication scheme when connecting to an event broker.",
                  "x-referenceable": true,
                  "x-encrypted": true
                },
                "id_token_header": {
                  "type": "string",
                  "description": "Specifies the header that contains id token for the `OAUTH2` authentication scheme when connecting to an event broker. This header takes precedence over the `id_token` field."
                },
                "scheme": {
                  "type": "string",
                  "enum": [
                    "BASIC",
                    "NONE",
                    "OAUTH2"
                  ],
                  "description": "The client authentication scheme used when connection to an event broker.",
                  "default": "BASIC"
                }
              },
              "description": "Session authentication related configuration."
            },
            "connect_timeout": {
              "type": "integer",
              "maximum": 100000,
              "minimum": 100,
              "description": "The timeout period (in milliseconds) for a connect operation to a given host (per host).",
              "default": 3000
            },
            "ssl_validate_certificate": {
              "type": "boolean",
              "description": "Indicates whether the API should validate server certificates with the trusted certificates.",
              "default": true
            },
            "generate_sequence_number": {
              "type": "boolean",
              "description": "When enabled, a sequence number is automatically included (if not already present) in the Solace-defined fields for each message sent.",
              "default": true
            },
            "properties": {
              "type": "object",
              "additionalProperties": {
                "type": "string",
                "x-referenceable": true,
                "x-lua-required": true
              },
              "description": "Additional Solace session properties (each setting needs to have `SESSION_` prefix)."
            },
            "host": {
              "type": "string",
              "description": "The IPv4 or IPv6 address or host name to connect to (see: https://docs.solace.com/API-Developer-Online-Ref-Documentation/c/index.html#host-entry).",
              "x-referenceable": true
            },
            "vpn_name": {
              "type": "string",
              "maxLength": 32,
              "description": "The name of the Message VPN to attempt to join when connecting to an event broker."
            },
            "calculate_message_expiry": {
              "type": "boolean",
              "description": "If this property is true and time-to-live has a positive value in a message, the expiration time is calculated when the message is sent or received",
              "default": true
            },
            "generate_rcv_timestamps": {
              "type": "boolean",
              "description": "When enabled, a receive timestamp is recorded for each message.",
              "default": true
            }
          },
          "required": [
            "host"
          ],
          "description": "Session related configuration."
        },
        "flow": {
          "type": "object",
          "properties": {
            "max_unacked_messages": {
              "type": "integer",
              "description": "This property controls the maximum number of messages that may be unacknowledged on the Flow.",
              "default": -1
            },
            "window_size": {
              "type": "integer",
              "maximum": 255,
              "minimum": 1,
              "description": "The Guaranteed message window size for the Flow.",
              "default": 255
            },
            "wait_timeout": {
              "type": "integer",
              "maximum": 5000,
              "minimum": 1,
              "description": "Specifies in milliseconds how long to wait for messages to appear on each poll before giving up or retrying.",
              "default": 50
            },
            "functions": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "The Lua functions that manipulates the message being received from Solace. The `message` variable can be used to access the current message content, and the function can return a new content."
            },
            "properties": {
              "type": "object",
              "additionalProperties": {
                "type": "string",
                "x-referenceable": true,
                "x-lua-required": true
              },
              "description": "Additional Solace flow properties (each setting needs to have `FLOW_` prefix)."
            },
            "binds": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "description": "The name of the Queue that is the target of the bind. You can use $(uri_captures['<capture-identifier>']) in this field (replace `<capture-identifier>` with a real value, for example `$uri_captures['queue']` when the matched route has a path `~/(?<queue>[a-z]+)`)"
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "QUEUE"
                    ],
                    "description": "The type of object to which this Flow is bound.",
                    "default": "QUEUE"
                  }
                },
                "required": [
                  "name"
                ]
              },
              "minLength": 1
            },
            "selector": {
              "type": "string",
              "description": "The selector when binding to an endpoint."
            },
            "ack_mode": {
              "type": "string",
              "enum": [
                "AUTO",
                "CLIENT"
              ],
              "description": "Controls how acknowledgments are generated for received Guaranteed messages. When set to `AUTO`, the messages are positively acknowledged upon receiving them. When set to 'CLIENT', the messages are positively or negatively acknowledged by Kong regarding to client delivery status.",
              "default": "CLIENT"
            }
          },
          "required": [
            "binds"
          ],
          "description": "The flow related configuration."
        },
        "mode": {
          "type": "string",
          "enum": [
            "AUTO",
            "POLLING",
            "SERVER-SENT-EVENTS",
            "WEBSOCKET"
          ],
          "description": "The mode of operation for the policy. The `AUTO` determines the mode automatically from the client request.",
          "default": "POLLING"
        },
        "polling": {
          "type": "object",
          "properties": {
            "timeout": {
              "type": "integer",
              "maximum": 300000,
              "minimum": 0,
              "description": "Polling timeout in milliseconds. When set to `0`, the polling works like short-polling and waits at maximum the Flow `wait_timeout` amount of time for the new messages (short-polling). When set to larger than `0`, the connection is kept open and only closed after the timeout or in case messages appear earlier (long-polling).",
              "default": 0
            }
          },
          "description": "The `POLLING` mode related configuration settings."
        },
        "websocket": {
          "type": "object",
          "properties": {
            "max_recv_len": {
              "type": "integer",
              "description": "Specifies the maximal length of payload allowed when receiving WebSocket frames.",
              "default": 65536
            },
            "max_send_len": {
              "type": "integer",
              "description": "Specifies the maximal length of payload allowed when sending WebSocket frames.",
              "default": 65536
            },
            "timeout": {
              "type": "integer",
              "maximum": 60000,
              "minimum": 1,
              "description": "Specifies the network timeout threshold in milliseconds.",
              "default": 1000
            }
          },
          "description": "The `WEBSOCKET` mode related configuration settings."
        }
      },
      "required": [
        "flow",
        "session"
      ]
    }
  }
}

더 알아보기 (Learn more)

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