Pulsar Connectors
消息处理(Processing guarantee)
- at-most-once
- at-least-once
- effectively-once
操作流程(JDBC sink)
- Add a configuration file.
- Create a schema.
- Upload a schema to a topic.
- Create a JDBC sink
- Stop a JDBC sink
- Restart a JDBC sink
- Update a JDBC sink
内建连接器(Built-in connector)
Source connector
- Canal
- File
- Flume
- Kafka
- RabbitMQ
Sink connector
- ElasticSearch/Solr
- Flume
- HBase
- HDFS2/HDFS3
- InfluxDB
- JDBC ClickHouse/MariaDB/PostgreSQL
- Kafka
- MongoDB
- RabbitMQ
- Redis
ClickHouse Sink
- 创建表
CREATE DATABASE IF NOT EXISTS monitor;
CREATE TABLE IF NOT EXISTS monitor.pulsar_clickhouse_jdbc_sink
(
id UInt32,
name String
) ENGINE = TinyLog;
INSERT INTO monitor.pulsar_clickhouse_jdbc_sink (id, name)
VALUES (1, 'tmp');
SELECT *
FROM monitor.pulsar_clickhouse_jdbc_sink;
- 创建配置
$ vi $PULSAR_HOME/connectors/pulsar-clickhouse-jdbc-sink.yaml
{
"userName": "sysop",
"password": "123456",
"jdbcUrl": "jdbc:clickhouse://server-101:8123/monitor",
"tableName": "pulsar_clickhouse_jdbc_sink"
}
- 创建schema
$ vi $PULSAR_HOME/connectors/json-schema.json
{
"name": "",
"schema": {
"type": "record",
"name": "SeedEvent",
"namespace": "com.cloudwise.quickstart.model",
"fields": [
{
"name": "id",
"type": [
"null",
"int"
]
},
{
"name": "name",
"type": [
"null",
"string"
]
}
]
},
"type": "JSON",
"properties": {
"__alwaysAllowNull": "true",
"__jsr310ConversionEnabled": "false"
}
}
- 上传schema
$ $PULSAR_HOME/bin/pulsar-admin schemas upload \
pulsar-postgres-jdbc-sink-topic \
-f $PULSAR_HOME/connectors/json-schema.json
- 运行
$ $PULSAR_HOME/bin/pulsar-admin sinks create \
--tenant public \
--namespace default \
--name pulsar-clickhouse-jdbc-sink \
--inputs pulsar-clickhouse-jdbc-sink-topic \
--sink-config-file $PULSAR_HOME/connectors/pulsar-clickhouse-jdbc-sink.yaml \
--archive $PULSAR_HOME/connectors/pulsar-io-jdbc-clickhouse-2.6.2.nar \
--processing-guarantees EFFECTIVELY_ONCE \
--parallelism 1
写在最后
近年来,在AIOps领域快速发展的背景下,IT工具、平台能力、解决方案、AI场景及可用数据集的迫切需求在各行业迸发。基于此,云智慧在2021年8月发布了AIOps社区,旨在树起一面开源旗帜,为各行业客户、用户、研究者和开发者们构建活跃的用户及开发者社区,共同贡献及解决行业难题、促进该领域技术发展。
社区先后开源了数据可视化编排平台-FlyFish、运维管理平台OMP、云服务管理平台-摩尔平台、Hours算法等产品。
可视化编排平台-FlyFish:
项目介绍:https://www.cloudwise.ai/flyF...
Github地址: https://github.com/CloudWise-...
Gitee地址: https://gitee.com/CloudWise/f...
行业案例:https://www.bilibili.com/vide...
部分大屏案例:
您可以添加小助手(xiaoyuerwie)备注:飞鱼。加入开发者交流群,可与业内大咖进行1V1交流!
也可通过小助手获取云智慧AIOps资讯,了解FlyFish最新进展!
系列阅读
深入浅出Apache Pulsar(1):Pulsar vs Kafka
深入浅出Apache Pulsar(2):Pulsar消息机制
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。