Search in sources :

Example 6 with CommandProducerSuccess

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

the class Commands method newProducerSuccess.

public static ByteBuf newProducerSuccess(long requestId, String producerName) {
    CommandProducerSuccess.Builder producerSuccessBuilder = CommandProducerSuccess.newBuilder();
    producerSuccessBuilder.setRequestId(requestId);
    producerSuccessBuilder.setProducerName(producerName);
    CommandProducerSuccess producerSuccess = producerSuccessBuilder.build();
    ByteBuf res = serializeWithSize(BaseCommand.newBuilder().setType(Type.PRODUCER_SUCCESS).setProducerSuccess(producerSuccess));
    producerSuccess.recycle();
    producerSuccessBuilder.recycle();
    return res;
}
Also used : CommandProducerSuccess(com.yahoo.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess) UnpooledHeapByteBuf(io.netty.buffer.UnpooledHeapByteBuf) RecyclableDuplicateByteBuf(io.netty.buffer.RecyclableDuplicateByteBuf) ByteBuf(io.netty.buffer.ByteBuf)

Aggregations

CommandProducerSuccess (com.yahoo.pulsar.common.api.proto.PulsarApi.CommandProducerSuccess)6 ByteBuf (io.netty.buffer.ByteBuf)6 Test (org.testng.annotations.Test)5 CommandError (com.yahoo.pulsar.common.api.proto.PulsarApi.CommandError)3 AuthorizationManager (com.yahoo.pulsar.broker.authorization.AuthorizationManager)2 PersistentTopic (com.yahoo.pulsar.broker.service.persistent.PersistentTopic)2 CommandSendReceipt (com.yahoo.pulsar.common.api.proto.PulsarApi.CommandSendReceipt)1 CommandSuccess (com.yahoo.pulsar.common.api.proto.PulsarApi.CommandSuccess)1 MessageMetadata (com.yahoo.pulsar.common.api.proto.PulsarApi.MessageMetadata)1 DestinationName (com.yahoo.pulsar.common.naming.DestinationName)1 AuthAction (com.yahoo.pulsar.common.policies.data.AuthAction)1 RecyclableDuplicateByteBuf (io.netty.buffer.RecyclableDuplicateByteBuf)1 UnpooledHeapByteBuf (io.netty.buffer.UnpooledHeapByteBuf)1