{
  "synLogic": "int $ret \u003d $api($1, $2, $3);",
  "help": "The SSL Configuration API provides the ns_kafka_set_ssl_ciphers () function that initializes the SSL ciphers for Kafka. In Kafka, SSL ciphers refer to the encryption algorithms used for secure communication between clients and brokers. These ciphers define the cryptographic algorithms and parameters used for encrypting and decrypting the data transmitted over the network.",
  "notes": "",
  "returns": "The function returns 0 on success and a negative error code on failure. It return boolean in Java",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\"\u003e \u003ctbody\u003e\u003ctr\u003e \u003cth\u003e Argument \u003c/th\u003e \u003cth\u003e Description \u003c/th\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e JPID \u003c/td\u003e \u003ctd\u003e It is the pool id returned from ns_kafka_init_producer () or ns_kafka_init_consumer () api.\u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Ciphers \u003c/td\u003e \u003ctd\u003e A comma-separated list of SSL ciphers to be used. \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd\u003e Error Message \u003c/td\u003e \u003ctd\u003e A pointer to a buffer that will contain the error message in case of any error. \u003c/td\u003e \u003c/tr\u003e   \u003c/tbody\u003e\u003c/table\u003e",
  "parameterization": "",
  "component": [
    {
      "id": "$1",
      "type": "TextField",
      "label": "JMS Pool Connection Id",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "First character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "If JMS Connection id is a program variable",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      },
      "quotes": false
    },
    {
      "id": "$2",
      "type": "TextField",
      "label": "Ciphers",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter ciphers",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      },
      "quotes": true
    },
    {
      "id": "$3",
      "type": "TextField",
      "label": "Error Message Buffer Pointer",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter error message",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      },
      "quotes": false
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "First character must be Alpha.\r\nOther characters are Alpha, Numeric or Underscore.",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      },
      "quotes": true
    }
  ],
  "name": "ns_kafka_set_ssl_ciphers",
  "syntax": "int ns_kafka_set_ssl_ciphers(int jpid, char *ciphers, char *error_msg);",
  "javaSyntax": "boolean ns_kafka_set_ssl_ciphers(JMSKey key, String ciphers);",
  "cEx": "flow()\n{\n  int jpid;        //JMS Pool Id\n  int jcid;        //JMS Connection Id\n  char error_msg[1024 + 1];        // Error string. Must be 1024 size\n  int ret;        // Error code\n  int msg_len \u003d 1024;\n  char msg[1024 + 1];        int hdr_len \u003d 1024;\n  char header[1024 + 1];\n\n  if((jpid \u003d ns_kafka_init_consumer(\"127.0.0.1\", 9092, \"topic\", \"consumer_group\", 5, error_msg)) \u003c 0)\n  {\n    fprintf(stderr, \"Error in initializing Kafka Consumer. Error code \u003d %d, Error Msg \u003d %s\", jpid, error_msg);\n    return;\n  }\n\n  if((ret \u003d ns_kafka_set_ssl_ciphers(jpid, \"ciphers\", error_msg)) \u003c 0)\n  {\n    fprintf(stderr, \"Error in setting Kafka ssl ciphers. Error code \u003d %d, Error Msg \u003d %s\", ret, error_msg);\n    return;\n  }\n}",
  "javaEx": "public class flow implements NsFlow\n{\n  public int execute(NSApi nsApi) throws Exception \n  {\n        NSApi.JMSKey key \u003d null;\n\n        //SSL config apis are required only if ssl protocol is enabled for kafka\n        //This api will initialize kafka ssl ciphers\n        //ns_kafka_set_ssl_ciphers(key, ciphers)\n        if(!nsApi.ns_kafka_set_ssl_ciphers(key, \"ciphers\") \u0026\u0026 key.getErrCode() !\u003d 0)\n        {\n         System.out.println(\"Error in setting Kafka ssl ciphers. Error code \u003d \" + key.getErrCode() + \", Error Msg \u003d \" + key.getErrMsg());\n         return 0;\n        }\n  }\n}",
  "insertStrC": "ns_kafka_set_ssl_ciphers(int jpid, char *ciphers, char *error_msg);",
  "insertStrJava": "ns_kafka_set_ssl_ciphers(JMSKey key, String ciphers);",
  "description": "The SSL Configuration API provides the ns_kafka_set_ssl_ciphers () function that initializes the SSL ciphers for Kafka. In Kafka, SSL ciphers refer to the encryption algorithms used for secure communication between clients and brokers. These ciphers define the cryptographic algorithms and parameters used for encrypting and decrypting the data transmitted over the network."
}