{
  "synLogic": "int $ret \u003d $api($1, $2, $3, $4, $5, $6, $7, $8);",
  "help": "The ns_tibco_init_consumer() function is used to initialize a TIBCO messaging consumer. It connects to a TIBCO messaging server at the specified hostname/IP and port, subscribes to the specified topic, and authenticates using the specified user ID and password. The function returns a unique identifier for the consumer, which can be used to receive messages from the TIBCO messaging server.",
  "notes": "Fields:\ntibco_hostname: Host name of the Tibco server\ntibco_port: Port of Tibco server\ntibco_use_topic_or_queue: The user can choose either topic or queue (NS_TIBCO_USE_TOPIC / NS_TIBCO_USE_QUEUE)\ntibco_topic_or_queue: Topic or Queue name\ntibco_userId: Username for Tibco server (if authentication is needed).\ntibco_password: Password for Tibco server (if authentication is needed).\nmax_pool_size: Maximum connection pool size.",
  "returns": "It returns JMS Pool ID which need to be passed for getting connection from the pool",
  "arguments": "\u003ctable class\u003d\"newGuiTable\" style\u003d\"width:100%\" \u003e \u003ctr\u003e         \u003cth\u003eArgument\u003c/th\u003e     \u003cth\u003eDescription\u003c/th\u003e     \u003c/tr\u003e              \u003ctr\u003e    \u003ctd\u003eHost Name\u003c/td\u003e     \u003ctd\u003e A string that specifies the hostname or IP address of the Tibco server.       \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e       \u003ctd\u003ePort\u003c/td\u003e     \u003ctd\u003e An integer that specifies the port number of the Tibco server.   \u003c/td\u003e     \u003c/tr\u003e     \u003ctr\u003e    \u003ctd\u003eTopic or Queue\u003c/td\u003e     \u003ctd\u003e The user can either select Topic or Queue. An integer that specifies whether the Tibco consumer is being used for a topic or a queue. In the given code, it is set to 1, which indicates that it is being used for a topic. \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e    \u003ctd\u003eTopic or Queue Name\u003c/td\u003e     \u003ctd\u003e            Topic or Queue name        \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e    \u003ctd\u003eUser Id\u003c/td\u003e     \u003ctd\u003e  It is the User ID for Tibco by which the user can have the monitoring access.        \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e    \u003ctd\u003ePassword\u003c/td\u003e     \u003ctd\u003e   It is the password for Tibco by which the user can have the monitoring access.      \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e    \u003ctd\u003ePool Size\u003c/td\u003e     \u003ctd\u003e            It is the maximum number of connections. The user can specify a maximum of 65535 connections.         \u003c/td\u003e     \u003c/tr\u003e  \u003ctr\u003e    \u003ctd\u003eError Message\u003c/td\u003e     \u003ctd\u003e  A string variable that will contain an error message if the function fails.    \u003c/td\u003e     \u003c/tr\u003e  \u003c/table\u003e",
  "parameterization": "",
  "name": "ns_tibco_init_consumer",
  "syntax": "int ns_tibco_init_consumer( char *tibco_hostname, int tibco_port, int t_or_q, char *tibco_topic_or_queue, char *tibco_userId, char *tibco_password, int max_pool_size, char *error_msg)",
  "javaSyntax": "int ns_tibco_init_consumer( String tibco_hostname, int tibco_port, int t_or_q, String tibco_topic_or_queue, String tibco_userId, String tibco_password, int max_pool_size, String error_msg)",
  "cEx": "flow()\n{\n  int jpid;	//JMS Pool Id\n  int jcid;	//JMS Connection Id\n  char header[1024];	//message to be recieved\n  int header_len = 1024;	//message length\n  char error_msg[1024 + 1];	// Error string. Must be 1024 size\n  int ret;	// Error code\n  int msg_len = 1024;\n  char msg[1024 + 1];\n\n  if((jpid = ns_tibco_init_consumer(\"ssl://127.0.0.1\", 7222, 1, \"topic\", \"user_id\", ns_decrypt(\"NlEyRDZGLUQg\"), 1,error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in initializing Tibco consumer. Error code = %d, Error Msg = %s\", jpid, error_msg);\n    return;\n  }\n}",
  "javaEx": "flow()\n{\n  int jpid;	//JMS Pool Id\n  int jcid;	//JMS Connection Id\n  char header[1024];	//message to be recieved\n  int header_len = 1024;	//message length\n  char error_msg[1024 + 1];	// Error string. Must be 1024 size\n  int ret;	// Error code\n  int msg_len = 1024;\n  char msg[1024 + 1];\n\n  if((jpid = ns_tibco_init_consumer(\"ssl://127.0.0.1\", 7222, 1, \"topic\", \"user_id\", ns_decrypt(\"NlEyRDZGLUQg\"), 1,error_msg)) < 0)\n  {\n    fprintf(stderr, \"Error in initializing Tibco consumer. Error code = %d, Error Msg = %s\", jpid, error_msg);\n    return;\n  }\n}",
  "insertStrC": "ns_tibco_init_consumer( char *tibco_hostname, int tibco_port, int t_or_q, char *tibco_topic_or_queue, char *tibco_userId, char *tibco_password, int max_pool_size, char *error_msg);",
  "insertStrJava": "ns_tibco_init_consumer( String tibco_hostname, int tibco_port, int t_or_q, String tibco_topic_or_queue, String tibco_userId, String tibco_password, int max_pool_size, String error_msg);",
  "description": "The ns_tibco_init_consumer() function is used to initialize a TIBCO messaging consumer. It connects to a TIBCO messaging server at the specified hostname/IP and port, subscribes to the specified topic, and authenticates using the specified user ID and password. The function returns a unique identifier for the consumer, which can be used to receive messages from the TIBCO messaging server.",
  "component":[
    {
      "id": "$1",
      "type": "TextField",
      "label": "Host Name",
      "labelVarCheckbox": "If host name is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Host Name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
    {
      "id": "$2",
      "type": "TextField",
      "label": "Port",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter port",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Number",
        "required": true,
		"max": 2147483647,
		"min": 0
		}
    },
    {
      "id": "$3",
      "type": "Dropdown",
      "label": "Select Topic or Queue",
      "value": "NS_TIBCO_USE_TOPIC",
      "css": "p-grid p-align-center w-100-p",
      "title": "",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "list": [
        {
          "label": "Topic",
          "value": "NS_TIBCO_USE_TOPIC"
        },
        {
          "label": "Queue",
          "value": "NS_TIBCO_USE_QUEUE"
        }
      ],
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0
      }
    },
     {
      "id": "$4",
      "type": "TextField",
      "label": "Topic/Queue Name",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Topic/Queue Name",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    },
     {
      "id": "$5",
      "type": "TextField",
      "label": "User Id",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter User Id",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    },
     {
      "id": "$6",
      "type": "TextField",
      "label": "Password",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter Password(If Applicable)",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "labelVarCheckbox": "",
      "argIndex": 0,
      "validate": {
        "inputType": "Text",
        "disabled": false,
        "required": true,
        "min": 0,
        "max": 0,
        "method": "isValidVar(arg)"
      }
    },
    {
      "id": "$7",
      "type": "TextField",
      "label": "Pool Size",
      "labelVarCheckbox": "",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter pool size",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Number",
        "required": true,
		"max": 2147483647,
		"min": 0
		}
    },
    {
      "id": "$8",
      "type": "TEXT_VAR",
      "label": "Error Message",
      "labelVarCheckbox": "If error message is a program variable.",
      "value": "",
      "css": "p-grid p-align-center w-100-p",
      "title": "Enter error message",
      "placeHolder": "",
      "style": "",
      "isDisabled": "",
      "validate": {
        "inputType": "Text",
        "required": true
		}
    },
    {
      "id": "$ret",
      "type": "TextField",
      "label": "Return Variable",
      "labelVarCheckbox": "",
      "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": "",
      "validate": {
        "inputType": "Text",
	"pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,63}$",
        "required": false,
        "method": "isValidVar(arg)"
      }
    }
  ]
}
