Apache Pulsar
Pinot supports consuming data from Apache Pulsar via pinot-pulsar plugin. You need to enable this plugin so that Pulsar specific libraries are present in the classpath.
You can enable pulsar plugin with the following config at the time of Pinot setup -Dplugins.include=pinot-pulsar
pinot-pulsar plugin is not part of official 0.10.0 binary. You can download the plugin from our external repository and add it to libs or plugins directory in pinot.

Set up Pulsar table

A sample Pulsar stream config to ingest data should look as follows. You can use the streamConfigs section from this sample and make changes for your corresponding table.
1
{
2
"tableName": "pulsarTable",
3
"tableType": "REALTIME",
4
"segmentsConfig": {
5
"timeColumnName": "timestamp",
6
"replicasPerPartition": "1"
7
},
8
"tenants": {},
9
"tableIndexConfig": {
10
"loadMode": "MMAP",
11
"streamConfigs": {
12
"streamType": "pulsar",
13
"stream.pulsar.topic.name": "<your pulsar topic name>",
14
"stream.pulsar.bootstrap.servers": "pulsar://localhost:6650,pulsar://localhost:6651",
15
"stream.pulsar.consumer.prop.auto.offset.reset" : "smallest",
16
"stream.pulsar.consumer.type": "lowlevel",
17
"stream.pulsar.fetch.timeout.millis": "30000",
18
"stream.pulsar.decoder.class.name": "org.apache.pinot.plugin.inputformat.json.JSONMessageDecoder",
19
"stream.pulsar.consumer.factory.class.name": "org.apache.pinot.plugin.stream.pulsar.PulsarConsumerFactory",
20
"realtime.segment.flush.threshold.rows": "1000000",
21
"realtime.segment.flush.threshold.time": "6h"
22
}
23
},
24
"metadata": {
25
"customConfigs": {}
26
}
27
}
Copied!

Pulsar configuration options

You can change the following Pulsar specifc configurations for your tables
Property
Description
streamType
This should be set to "pulsar"
stream.pulsar.topic.name
Your pulsar topic name
stream.pulsar.bootstrap.servers
Comma-seperated broker list for Apache Pulsar

Authentication

Pinot-Pulsar connector supports authentication using the security tokens. You can generate the token by following the official Pulsar documentaton. Once generated, you can add the following property to streamConfigs to add auth token for each request
1
"stream.pulsar.authenticationToken":"your-auth-token"
Copied!

TLS support

Pinot-pulsar connecor also supports TLS for encrypted connections. You can follow the official pulsar documentation to enable TLS on your pulsar cluster. Once done, you can enable TLS in pulsar connector by providing the trust certificate file location generated in the previous step.
1
"stream.pulsar.tlsTrustCertsFilePath": "/path/to/ca.cert.pem"
Copied!
Also, make sure to change the brokers url from pulsar://localhost:6650 to pulsar+ssl://localhost:6650 so that secure connections are used.
For other table and stream configurations, you can headover to Table configuration Reference

Supported Pulsar versions

PInot currently relies on Pulsar client version 2.7.2. Users should make sure the Pulsar broker is compatible with the this client version.