rocketmq rsqldb 简单记录

GitHub 地址 https://github.com/alibaba/rsqldb/tree/main,是和目前stream sql化看齐的Rocketmq的sql,类似还有kafka的sqlDB 和flink sql。

  • 目前版本0.2 ,主要提供rest模式调用,controller类为public class RsqlController
  • 支持的sql 主要是create table,insert和select
  • 支持windows
  • 需要主动terminal job,否则job会长期处于running 状态,如以下截图

rocketmq rsqldb 简单记录_第1张图片

总体感觉刚刚起步,在win10 idea 下run有如下错误,但debug可以pass(没有仔细看原因,估计是某个bean没有默认初始化)

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-07-29 18:21:17.969 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rsqlController' defined in file [D:\mydocuments\as4_code\rocketmq\rsqldb-rsqldb-0.2\rsqldb-rest\target\classes\com\alibaba\rsqldb\rest\controller\RsqlController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultRsqlService' defined in file [D:\mydocuments\as4_code\rocketmq\rsqldb-rsqldb-0.2\rsqldb-rest\target\classes\com\alibaba\rsqldb\rest\service\iml\DefaultRsqlService.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'RSQLEngin' defined in file [D:\mydocuments\as4_code\rocketmq\rsqldb-rsqldb-0.2\rsqldb-rest\target\classes\com\alibaba\rsqldb\rest\service\iml\RSQLEngin.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.rsqldb.rest.service.iml.RSQLEngin]: Constructor threw exception; nested exception is com.alibaba.rsqldb.common.exception.RSQLServerException: start localStore error.

以上异常在以下代码中createStaticCompactTopic中。

  try {
            //创建逻辑分区数为1的topic,确保命令先进先出地执行。
            RocketMQUtil.createStaticCompactTopic(mqAdmin, topicName, 1, null);

            pullConsumer.start();
            producer.start();

            Collection<MessageQueue> messageQueues = pullConsumer.fetchMessageQueues(topicName);
            if (messageQueues == null || messageQueues.size() != 1) {
                throw new RSQLServerException("command topic queue not equals 1. messageQueue=" + messageQueues);
            }
            commandMessageQueue = messageQueues;
        } catch (Exception e) {
            throw new RSQLServerException("start localStore error.", e);
        }

你可能感兴趣的:(Rocketmq,rocketmq,rsql,stream)