Search in sources :

Example 1 with IncrementalAlterConfigsRequestData

use of org.apache.kafka.common.message.IncrementalAlterConfigsRequestData in project kafka by apache.

the class RequestResponseTest method createIncrementalAlterConfigsRequest.

private IncrementalAlterConfigsRequest createIncrementalAlterConfigsRequest(short version) {
    IncrementalAlterConfigsRequestData data = new IncrementalAlterConfigsRequestData();
    AlterableConfig alterableConfig = new AlterableConfig().setName("retention.ms").setConfigOperation((byte) 0).setValue("100");
    IncrementalAlterConfigsRequestData.AlterableConfigCollection alterableConfigs = new IncrementalAlterConfigsRequestData.AlterableConfigCollection();
    alterableConfigs.add(alterableConfig);
    data.resources().add(new AlterConfigsResource().setResourceName("testtopic").setResourceType(ResourceType.TOPIC.code()).setConfigs(alterableConfigs));
    return new IncrementalAlterConfigsRequest.Builder(data).build(version);
}
Also used : AlterableConfig(org.apache.kafka.common.message.IncrementalAlterConfigsRequestData.AlterableConfig) IncrementalAlterConfigsRequestData(org.apache.kafka.common.message.IncrementalAlterConfigsRequestData) AlterConfigsResource(org.apache.kafka.common.message.IncrementalAlterConfigsRequestData.AlterConfigsResource)

Aggregations

IncrementalAlterConfigsRequestData (org.apache.kafka.common.message.IncrementalAlterConfigsRequestData)1 AlterConfigsResource (org.apache.kafka.common.message.IncrementalAlterConfigsRequestData.AlterConfigsResource)1 AlterableConfig (org.apache.kafka.common.message.IncrementalAlterConfigsRequestData.AlterableConfig)1