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 状态,如以下截图

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

java 复制代码
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中。

java 复制代码
  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);
        }
相关推荐
电魂泡哥6 小时前
RocketMq是CP模型还是AP模型
rocketmq
Apache RocketMQ1 天前
RocketMQ源码解析——秒级定时消息介绍
java·云原生·消息队列·rocketmq·java-rocketmq
zkkkkkkkkkkkkk1 天前
python使用celery实现异步任务
redis·python·rabbitmq·rocketmq
江湖中的阿龙2 天前
消息队列核心面试题详解|RocketMQ深度剖析,含选型、可靠性、顺序性、幂等、积压、高可用、事务消息
rocketmq
不会写程序的未来程序员2 天前
从快递物流到分布式架构:RocketMQ全栈进阶实战指南——从入门到高手的代码与原理解析
分布式·架构·rocketmq
老码观察2 天前
数环通消息中间件选型实录:RocketMQ vs Kafka vs RabbitMQ,我们为什么选了RocketMQ
kafka·rabbitmq·rocketmq
Apache RocketMQ3 天前
海量接入、毫秒响应:易易互联基于 Apache RocketMQ + MQTT 构筑高可用物联网消息中枢
物联网·rocketmq
庞轩px4 天前
第二篇:RocketMQ事务消息——分布式事务的最终一致性方案
分布式·rocketmq
庞轩px4 天前
第一篇:RocketMQ架构与核心概念——一条消息从生产到消费的完整旅程
架构·rocketmq
SuperherRo4 天前
服务攻防-处理平台安全&消息队列&ActiveMQ&RocketMQ&Kafka&Spring包&CVE复现
kafka·消息队列·rocketmq·activemq