Setting Consumer/Producer Job Attributes Through Scripts

Attributes defined for an object affect how the object is processed. Script statements allow you to dynamically change those object attributes and assign new values when the task is generated. The new values are only valid for the current generation and are not permanently stored in the object.

You can define the values of any of the settings of all Apache Kafka Jobs using scripts. You do this by using :PUT_ATT commands on the Pre-Process object definition page.

For more information, see the Automic Automation product documentation:

Setting Consumer Job Attributes Through Scripts

The attributes available for Apache Kafka Consumer Jobs are the following:

  • configurationFile

    Sets the path on the Agent machine where the Apache Kafka configuration file is stored.

    Value: String

  • failure

    Sets the value of the Define Failure Criteria in the object definition (whether the Job should fail or not depending on certain criteria).

    Value: Yes/No

  • failureHeaderKeyJsonPath

    Sets the value of the Header Key JSON Path in the object definition for Jobs that should fail.

    Value: String

  • failureHeaderKeyRegex

    Sets the value of the Header Key Regex in the object definition for Jobs that should fail.

    Value: String

  • failureHeaderValueJsonPath

    Sets the value of the Header Value JSON Path in the object definition for Jobs that should fail.

    Value: String

  • failureHeaderValueRegex

    Sets the value of the Header Value Regex in the object definition for Jobs that should fail.

    Value: String

  • failureKeyJsonPath

    Sets the value of the Key JSON Path in the object definition for Jobs that should fail.

    Value: String

  • failureKeyRegex

    Sets the value of the Key Regex in the object definition for Jobs that should fail.

    Value: String

  • failureValueJsonPath

    Sets the value of the Value JSON Path in the object definition for Jobs that should fail.

    Value: String

  • failureValueRegex

    Sets the value of the Value Regex in the object definition for Jobs that should fail.

    Value: String

  • groupId

    Sets the value of the Group ID in the object definition. This is the unique ID that identifies the consumer in a consumer group.

    Value: String

  • headerKeyJsonPath

    Sets the value of the Header Key JSON Path in the object definition.

    Value: String

  • headerKeyRegex

    Sets the value of the Header Key Regex in the object definition.

    Value: String

  • headerValueJsonPath

    Sets the value of the Header Value JSON Path in the object definition.

    Value: String

  • headerValueRegex

    Sets the value of the Header Value Regex in the object definition.

    Value: String

  • keyJsonPath

    Sets the value of the Key JSON Path in the object definition.

    Value: String

  • keyRegex

    Sets the value of the Key Regex in the object definition.

    Value: String

  • topic

    Sets the topic within Apache Kafka to which the Consumer Job subscribes.

    Value: String

  • valueJsonPath

    Sets the value of the Value JSON Path in the object definition.

    Value: String

  • valueRegex

    Sets the value of the Value Regex in the object definition.

    Value: String

For details about the Job attributes, see Apache Kafka Integration: Defining Consumer Jobs.

Setting Producer Job Attributes Through Scripts

The attributes available for Apache Kafka Producer Jobs are the following:

  • configurationFile

    Sets the path on the Agent machine where the Apache Kafka configuration file is stored.

    Value: String

  • headers

    Sets the value of the Message Headers in the object definition.

    Value: String

  • key

    Sets the value of the Key in the object definition.

    Value: String

  • partition

    Sets the value of the Partition in the object definition.

    Value: Integer

  • timestamps

    Sets the value of the Timestamp in the object definition.

    Values: Either Epoch or YY/MM/DD/hh/mm/ss

  • topic

    Sets the topic within Apache Kafka to which the Producer Job subscribes.

    Value: String

  • value

    Sets the value of the Value in the object definition (actual payload of the message).

    Values: Either text or JSON

For details about the Job attributes, see Apache Kafka Integration: Defining Producer Jobs.

See also: