Creating produce and bulk produce actions

Create a produce and bulk produce action.

Procedure

  1. In the Flow services page, click "+" (Plus) icon to create a new flow service.
  2. Provide a name and description for the flow service. The description is optional.
  3. On the Flow service step, type Kafka to select the Kafka connector.
  4. In the Type to choose action box, click Add Custom Operation.
  5. Create an account that can be used to access Kafka systems in the Account page.
    • Enter the name and description for the action.
    • Select the Kafka account of type produce and click Next.
  6. Select the Produce or Bulk Produce action in the Action page and click Next.
  7. Provide input to fields in the Produce or Bulk Produce page:
    Topic
    Kafka topic to which the message must be published. If you choose a topic from the provided list, the message is delivered to that topic. If you specify a topic that does not exist and the Kafka broker is configured to allow the automatic creation of new topics (auto.create.topics.enable). A new topic is created and the message is published when the action is run successfully.
    Partition
    Partition where the message must be stored. If a valid partition number is specified, that partition is used for sending the message. If no partition is specified but a key is provided, a partition is selected that uses a hash of the key. If a key or a partition is not specified, a partition is assigned in a round-robin fashion.
    Key schema
    Retrieves all the schemas registered in the schema registry server specified in the account configuration. It lists schemas only if the Key serializer field is selected as 'Avro' in the account and the schema registry server is reachable.

    Only applicable when the account associated with the action is confluent type or belongs to confluent distribution.

    Value schema
    Retrieves all the schemas registered in the schema registry server specified in the account configuration. It lists schemas only if the Value serializer field is selected as 'Avro' in the account and the schema registry server is reachable.

    Only applicable when the account associated with the action is confluent type or belongs to confluent distribution.

    Note: You can click the Overview button next to the Key schema and Value schema fields to view detailed schema information such as an overview of the schema, schema content, and subject versions.
    Max Messages
    Specifies the maximum number of messages to be produced. It serves as a validation limit that controls how many messages can be processed in a single bulk operation.
  8. Click Next. The Summary page.
  9. Verify the details in the Summary page and click Show Input/Output to view the signature.
  10. Click Done. The flow service editor's page is displayed. Click the Save icon to save the service.
  11. If the key or message input fields are of object type, follow the mentioned steps.
    • Click the input/output icon.
    • Create 2 input fields of type string. For example, key and message.
    • Click the View/Edit Mapping icon.
    • Map the fields.
    • Click the Save icon to save the service.
  12. Specify the schema field values in the pipeline and provide the input parameters. Click Run to run the service.