@Bean(CONSUMER_BEAN_NAME)
    @ConditionalOnMissingBean(DefaultLitePullConsumer.class)
    @ConditionalOnProperty(prefix = "rocketmq", value = {"name-server", "pull-consumer.group", "pull-consumer.topic"})
    public DefaultLitePullConsumer defaultLitePullConsumer(RocketMQProperties rocketMQProperties)
            throws MQClientException {
        RocketMQProperties.PullConsumer consumerConfig = rocketMQProperties.getPullConsumer();
        String nameServer = rocketMQProperties.getNameServer();
        String groupName = consumerConfig.getGroup();
        String topicName = consumerConfig.getTopic();
        Assert.hasText(nameServer, "[rocketmq.name-server] must not be null");
        Assert.hasText(groupName, "[rocketmq.pull-consumer.group] must not be null");
        Assert.hasText(topicName, "[rocketmq.pull-consumer.topic] must not be null");

        String accessChannel = rocketMQProperties.getAccessChannel();
        MessageModel messageModel = MessageModel.valueOf(consumerConfig.getMessageModel());
        SelectorType selectorType = SelectorType.valueOf(consumerConfig.getSelectorType());
        String selectorExpression = consumerConfig.getSelectorExpression();
        String ak = consumerConfig.getAccessKey();
        String sk = consumerConfig.getSecretKey();
        int pullBatchSize = consumerConfig.getPullBatchSize();
        boolean useTLS = consumerConfig.isTlsEnable();

        DefaultLitePullConsumer litePullConsumer = RocketMQUtil.createDefaultLitePullConsumer(nameServer, accessChannel,
                groupName, topicName, messageModel, selectorType, selectorExpression, ak, sk, pullBatchSize, useTLS);
        litePullConsumer.setEnableMsgTrace(consumerConfig.isEnableMsgTrace());
        litePullConsumer.setCustomizedTraceTopic(consumerConfig.getCustomizedTraceTopic());
        if (StringUtils.hasText(consumerConfig.getNamespace())) {
            litePullConsumer.setNamespace(consumerConfig.getNamespace());
        }
        if (StringUtils.hasText(consumerConfig.getNamespaceV2())) {
            litePullConsumer.setNamespaceV2(consumerConfig.getNamespaceV2());
        }
        litePullConsumer.setInstanceName(consumerConfig.getInstanceName());
        log.info("a pull consumer({} sub {}) init on namesrv {}",  groupName, topicName, nameServer);
        return litePullConsumer;
    }
@Test
    public void testDefaultLitePullConsumer() {
        runner.withPropertyValues("rocketmq.name-server=127.0.0.1:9876",
                "rocketmq.pull-consumer.group=spring_rocketmq",
                "rocketmq.pull-consumer.topic=test").
                run((context) -> {
                    assertThat(context).hasSingleBean(DefaultLitePullConsumer.class);
                });
    }