MetadataRequest

MetadataRequest is a request with Metadata API key and the following properties:

  • MetadataRequestData

  • Version

MetadataRequest is created when:

MetadataRequest can be created using the following factory methods:

import org.apache.kafka.common.requests.MetadataRequest

val r = MetadataRequest.Builder.allTopics
scala> println(r)
(type=MetadataRequest, topics=<ALL>)

import collection.JavaConverters._
val topics = Seq("t1", "t2").asJava
val allowAutoTopicCreation = false
val r = new MetadataRequest.Builder(topics, allowAutoTopicCreation)
scala> println(r)
(type=MetadataRequest, topics=t1,t2)

Create MetadataRequest.Builder for All Topics — allTopics Static Factory Method

// MetadataRequest.Builder.allTopics
Builder allTopics()

allTopics creates a new MetadataRequest for all topics and allowAutoTopicCreation flag enabled.

Note

allTopics is used when:

MetadataRequest.Builder Utility

MetadataRequest.Builder is a AbstractRequest.Builder to build a MetadataRequest.

MetadataRequest build(short version)

UpdateMetadataRequest.Builder is used when…​FIXME

Creating MetadataRequest from Byte Buffer — parse Utility

MetadataRequest parse(ByteBuffer buffer, short version)

parse…​FIXME

Note
parse is used when…​FIXME

results matching ""

    No results matching ""