Operation: Assign
The Assign operation manually assigns a list of partitions to a consumer. An existing client from the apachekafka-config.xml file is used for this.
Compared to the Subscribe operation, the Assign operation allows finer control over the partitions to be processed by the consumer.
Required parameters: clusterId, clientId, topic, process
The Assign and Subscribe operations are mutually exclusive.
Only one client can be used for the Assign operation if it is not already being used for another topic. A client cannot be assigned to several topics.
This means that the Assign operation can only be carried out for one specific client. This client is then assigned and cannot be used for other operations.
Input
The adapter does not expect any input.
Output
The adapter does not generate any direct output for the Assign operation. If a new message is received in an assigned partition, a process is started with the received message as input. This message is transferred in the following structure:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Message>
<ClusterId>X4Kafka</ClusterId>
<Topic>noKeyTopic</Topic>
<Offset>0</Offset>
<Headers>
<Header key="value 1">header1</Header>
<Header key="value 2">header2</Header>
<Header key="value 3">header3</Header>
</Headers>
<Content encoding="base64"key="055b93a8-4eda-41d8-8b73-b852a1d4da1e">055b93a8-4eda-41d8-8b73-b852a1d4da1e</Content>
</Message>