use of org.apache.pulsar.common.api.proto.PulsarApi.CommandSeek in project incubator-pulsar by apache.
the class Commands method newSeek.
public static ByteBuf newSeek(long consumerId, long requestId, long ledgerId, long entryId) {
CommandSeek.Builder seekBuilder = CommandSeek.newBuilder();
seekBuilder.setConsumerId(consumerId);
seekBuilder.setRequestId(requestId);
MessageIdData.Builder messageIdBuilder = MessageIdData.newBuilder();
messageIdBuilder.setLedgerId(ledgerId);
messageIdBuilder.setEntryId(entryId);
MessageIdData messageId = messageIdBuilder.build();
seekBuilder.setMessageId(messageId);
CommandSeek seek = seekBuilder.build();
ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.SEEK).setSeek(seek));
messageId.recycle();
messageIdBuilder.recycle();
seekBuilder.recycle();
seek.recycle();
return res;
}
Aggregations