use of org.apache.pulsar.common.api.proto.CommandRedeliverUnacknowledgedMessages in project pulsar by apache.
the class Commands method newRedeliverUnacknowledgedMessages.
public static ByteBuf newRedeliverUnacknowledgedMessages(long consumerId, List<MessageIdData> messageIds) {
BaseCommand cmd = localCmd(Type.REDELIVER_UNACKNOWLEDGED_MESSAGES);
CommandRedeliverUnacknowledgedMessages req = cmd.setRedeliverUnacknowledgedMessages().setConsumerId(consumerId);
messageIds.forEach(msgId -> {
MessageIdData m = req.addMessageId().setLedgerId(msgId.getLedgerId()).setEntryId(msgId.getEntryId());
if (msgId.hasBatchIndex()) {
m.setBatchIndex(msgId.getBatchIndex());
}
});
return serializeWithSize(cmd);
}
Aggregations