Search in sources :

Example 1 with CommandRedeliverUnacknowledgedMessages

use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages in project pulsar by yahoo.

the class Commands method newRedeliverUnacknowledgedMessages.

public static ByteBuf newRedeliverUnacknowledgedMessages(long consumerId, List<MessageIdData> messageIds) {
    CommandRedeliverUnacknowledgedMessages.Builder redeliverBuilder = CommandRedeliverUnacknowledgedMessages.newBuilder();
    redeliverBuilder.setConsumerId(consumerId);
    redeliverBuilder.addAllMessageIds(messageIds);
    CommandRedeliverUnacknowledgedMessages redeliver = redeliverBuilder.build();
    ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.REDELIVER_UNACKNOWLEDGED_MESSAGES).setRedeliverUnacknowledgedMessages(redeliverBuilder));
    redeliver.recycle();
    redeliverBuilder.recycle();
    return res;
}
Also used : CommandRedeliverUnacknowledgedMessages(com.yahoo.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages) UnpooledHeapByteBuf(io.netty.buffer.UnpooledHeapByteBuf) RecyclableDuplicateByteBuf(io.netty.buffer.RecyclableDuplicateByteBuf) ByteBuf(io.netty.buffer.ByteBuf)

Example 2 with CommandRedeliverUnacknowledgedMessages

use of com.yahoo.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages in project pulsar by yahoo.

the class Commands method newRedeliverUnacknowledgedMessages.

public static ByteBuf newRedeliverUnacknowledgedMessages(long consumerId) {
    CommandRedeliverUnacknowledgedMessages.Builder redeliverBuilder = CommandRedeliverUnacknowledgedMessages.newBuilder();
    redeliverBuilder.setConsumerId(consumerId);
    CommandRedeliverUnacknowledgedMessages redeliver = redeliverBuilder.build();
    ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.REDELIVER_UNACKNOWLEDGED_MESSAGES).setRedeliverUnacknowledgedMessages(redeliverBuilder));
    redeliver.recycle();
    redeliverBuilder.recycle();
    return res;
}
Also used : CommandRedeliverUnacknowledgedMessages(com.yahoo.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages) UnpooledHeapByteBuf(io.netty.buffer.UnpooledHeapByteBuf) RecyclableDuplicateByteBuf(io.netty.buffer.RecyclableDuplicateByteBuf) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

CommandRedeliverUnacknowledgedMessages (com.yahoo.pulsar.common.api.proto.PulsarApi.CommandRedeliverUnacknowledgedMessages)2 ByteBuf (io.netty.buffer.ByteBuf)2 RecyclableDuplicateByteBuf (io.netty.buffer.RecyclableDuplicateByteBuf)2 UnpooledHeapByteBuf (io.netty.buffer.UnpooledHeapByteBuf)2