This function is used to push an Adelia REF_CLASS-type variable or ALPHA variable to a Kafka broker, specifying a topic.
This function is executed using a configuration file (in YML format), defining the detailed configuration of the manipulated Adelia logical broker.
Application area
Cloud client
Java server
Java client
Web client
Parameters
ALPHA constant | AdeliaKafkaLogicalBroker | Adelia logical broker name. Its parameters (broker, port, etc.) are defined in the AdeliaKafkaConfig.YML configuration file). |
ALPHA(n) | Topic | Name of Kafka topic to send the record to. |
REF_CLASS or ALPHA(n) |
Instance or String | Class or alphanumeric string instance to send. |
NUM_BIN_4 | ReturnCode | Return code: 0: Successful execution 1: Exception (internal error during execution), detail of the exception in the second parameter (message relating to the return code). 2: Kafka logical broker not specified. 3: Publication topic not specified. 4: The instance to publish (REF_CLASS variable) is null. 5: Configuration not loaded: no logical broker defined: .YML file not defined, found or loaded. 6: no configuration defined in the .YML file for the specified Adelia Kafka logical broker. |
ALPHA(n) | ReturnMessage | Message detailing the return code. |
Example 1
REF_CLASS(MYCLASS) myInstance
myTopic = 'mytopicadelia'
CALL_DLL 'VaToolBx.dll' 'VaToolBxSendToAvroKafka' 'myKafkaLogicalBroker' myTopic myInstance myReturnCode myReturnMessage
*myReturnCode is specified
*myReturnMessage is specified
Example 2
ALPHA(123) myMessage
myTopic = 'mytopicadelia?
myMessage = 'message sent from HF1234'CALL_DLL 'VaToolBx.dll' 'VaToolBxSendToAvroKafka' 'myKafkaLogicalBroker' myTopic myMessage myReturnCode myReturnMessage
*myReturnCode is specified
*myReturnMessage is specified
List of VaToolBx DLL functions by topic