Skip to content

Pulsar Data Connector docs [CTT-1428] - #2301

Open
TomaszGaweda wants to merge 14 commits into
hazelcast:mainfrom
TomaszGaweda:pulsar-data-connector
Open

TomaszGaweda wants to merge 14 commits into
hazelcast:mainfrom
TomaszGaweda:pulsar-data-connector

Conversation

@TomaszGaweda

@TomaszGaweda TomaszGaweda commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Includes:

  • Basic connector info
  • SQL mappings
  • Data Connection

I didn't include too much of Java API details, there are easily accessible after the release. Wanted to focus on basic concepts and ideas "why and how".

@TomaszGaweda TomaszGaweda changed the title Pulsar Data Connector docs [WIP] Pulsar Data Connector docs [CTT-1428] Sep 3, 2026
@TomaszGaweda
TomaszGaweda marked this pull request as ready for review September 3, 2026 16:13
@TomaszGaweda
TomaszGaweda requested a review from a team as a code owner September 3, 2026 16:13
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Comment thread docs/modules/data-connections/pages/pulsar-dc-configuration.adoc Outdated

[source,java]
----
Pipeline p = Pipeline.reate();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pipeline.reate() does not compile - neither builder sets the required connectionSupplier or dataConnectionRef, and the sink ends with a stray backtick.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, it compiles, but fails at runtime ;p fixed


[source,sql]
----
CREATE MAPPING my_topic <1>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This CREATE MAPPING omits valueFormat, so KvMetadataResolvers rejects it

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OPTIONS (
'keyFormat'='int',
'valueFormat'='varchar',
'bootstrap.servers' = '127.0.0.1:9092'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This example omits DATA CONNECTION and uses Kafka's bootstrap.servers, which Pulsar ignores - the first read or write reaches Utils.getClient() with neither a supplier nor DataConnectionRef and fails.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'keyFormat' = 'java',
'keyJavaClass' = 'java.lang.Long',
'valueFormat' = 'java',
'valueJavaClass' = 'com.example.Person'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

valueFormat='java' cannot handle com.example.Person - PulsarTable.resolveSchema() only supports the built-in types and throws UnsupportedOperationException for this class. The SQL also misses its closing );

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CREATE MAPPING my_topic <1>
DATA CONNECTION myPulsar <2>
OPTIONS (
'preferredLocalParallelism' = '2' <3>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PulsarTable never reads preferredLocalParallelism - it always returns LOCAL_PARALLELISM_USE_DEFAULT, so the documented value 2 has no effect. The partition guidance is also Kafka-specific - this connector uses a Shared subscription rather than one-to-one partition assignment. We need to remove this option and guidance or implement them for Pulsar

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at never reading preferredLocalParallelism - gotcha, bug.

at guidance being Kafka specific - no, it's not, Pulsar just moves assignment to the broker, but incorrect number may result in some processors getting more work

Comment thread docs/modules/integrate/pages/connectors.adoc Outdated
|exactly-once


|xref:sql:mapping-to-pulsar.adoc[Apache Pulsar]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapping-to-pulsar.adoc is missing from ROOT/nav.adoc, while querying-streams.adoc still says Kafka is the only SQL streaming source - the only links to the new page are in this connector table.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</hazelcast>
----
<1> (Required) Broker URL, mandatory property.
<2> (Optional) Broker HTTP Service - necessary for resource listing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tenant and namespace only filter listResources() - they do not restrict which topics the returned client can read or write. A fully qualified topic outside that scope is still accessible if the broker allows it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

true, ef2f8ab

Comment thread docs/modules/sql/pages/mapping-to-pulsar.adoc Outdated
() -> PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(),
() -> Schema.JSON(Event.class),
Message::getValue).build();
StreamSource<Event> source = PulsarSources.pulsarConsumerBuilder(json(Event.class))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching to the consumer changes the restart behaviour described below - the current consumer acks messages even with snapshots disabled and reconnects to the same subscription. Restarting does not replay acknowledged history - Earliest only sets the position for a new subscription.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What changes? I don't see anything in the text below that changes, maybe I am overlooking something obvious after staring at it for too long :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants