/** * Return the metadata for the next error response. */ public FetchMetadata nextCloseExisting() { return new FetchMetadata(sessionId, INITIAL_EPOCH); }
/** * Return the metadata for the next incremental response. */ public FetchMetadata nextIncremental() { return new FetchMetadata(sessionId, nextEpoch(epoch)); }
/** * Return the metadata for the next full fetch request. */ public static FetchMetadata newIncremental(int sessionId) { return new FetchMetadata(sessionId, nextEpoch(INITIAL_EPOCH)); }
metadata = new FetchMetadata(struct.getOrElse(SESSION_ID, INVALID_SESSION_ID), struct.getOrElse(SESSION_EPOCH, FINAL_EPOCH));
toForgetTopics.add(new TopicPartition("foo", 2)); toForgetTopics.add(new TopicPartition("bar", 0)); checkRequest(createFetchRequest(7, new FetchMetadata(123, 456), toForgetTopics)); checkResponse(createFetchResponse(123), 7); checkResponse(createFetchResponse(Errors.FETCH_SESSION_ID_NOT_FOUND, 123), 7);