use of org.apache.pulsar.common.api.proto.CommandFlow in project pulsar by apache.
the class NonDurableSubscriptionTest method newPulsarService.
@Override
protected PulsarService newPulsarService(ServiceConfiguration conf) throws Exception {
return new PulsarService(conf) {
@Override
protected BrokerService newBrokerService(PulsarService pulsar) throws Exception {
BrokerService broker = new BrokerService(this, ioEventLoopGroup);
broker.setPulsarChannelInitializerFactory((_pulsar, opts) -> {
return new PulsarChannelInitializer(_pulsar, opts) {
@Override
protected ServerCnx newServerCnx(PulsarService pulsar, String listenerName) throws Exception {
return new ServerCnx(pulsar) {
@Override
protected void handleFlow(CommandFlow flow) {
super.handleFlow(flow);
numFlow.incrementAndGet();
}
};
}
};
});
return broker;
}
};
}
Aggregations