Package org.apache.kafka.common.requests

Examples of org.apache.kafka.common.requests.RequestHeader.correlationId()


        RequestSend send = new RequestSend(node.id(), reqHeader, produceRequest.toStruct());
        ClientRequest request = new ClientRequest(time.milliseconds(), true, send, null);
        awaitReady(client, node);
        client.poll(Arrays.asList(request), 1, time.milliseconds());
        assertEquals(1, client.inFlightRequestCount());
        ResponseHeader respHeader = new ResponseHeader(reqHeader.correlationId());
        Struct resp = new Struct(ProtoUtils.currentResponseSchema(ApiKeys.PRODUCE.id));
        resp.set("responses", new Object[0]);
        int size = respHeader.sizeOf() + resp.sizeOf();
        ByteBuffer buffer = ByteBuffer.allocate(size);
        respHeader.writeTo(buffer);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.