Closed yangweicode closed 3 years ago
GitHub issues are not for asking questions; use stack overflow for questions.
recordMetadataChannel
The bean name of a
MessageChannel
to which successful send results should be sent; the bean must exist in the application context. The message sent to the channel is the sent message (after conversion, if any) with an additional headerKafkaHeaders.RECORD_METADATA
. The header contains a RecordMetadata object provided by the Kafka client; it includes the partition and offset where the record was written in the topic.
ResultMetadata meta = sendResultMsg.getHeaders().get(KafkaHeaders.RECORD_METADATA, RecordMetadata.class)
Subscribe to that channel with a @ServiceActivator
or IntegrationFlow
bean.
I saw “sendSuccessChannel” in “KafkaProducerMessageHandler”,But I didn’t find the relevant usage introduction