1. Build Applications
  2. Kafka Clients

Migrating to StreamNative

StreamNative adds native support for the Kafka protocol, but it does not mean StreamNative is an exact copy of Apache Kafka. StreamNative not only maintains compatibility with the Kafka protocol but also incorporates many of Pulsar's excellent features. It is crucial for Kafka users to understand these differences before migrating to StreamNative. By doing so, they can avoid any potential losses resulting from the disparities between the two systems.

Data Retention

Pulsar has a different data retention policy by default. In Pulsar, consumed and acknowledged data from all subscriptions, or data from topics with no subscriptions, is systematically removed from the topic segment by segment. In contrast, Kafka retains data within the topic for a fixed duration of 7 days, regardless of whether it has been consumed or not. However, StreamNative adopts Pulsar's approach, offering users a data retention policy that can discern data consumption patterns. Therefore, when migrating to StreamNative, it is necessary to proactively adjust the data retention policy to prevent the deletion of data that has been written, after consumption, or in the absence of subscriptions. Certainly, if Pulsar's behavior aligns with your expectations, there would be no need to modify the policy.

You can follow the Pulsar Admin CLI, Pulsar Admin API or Pulsar Admin REST API to set the data retention policy for the namespace or topic.

Set data retention for namespace

Set data retention for topic

Kafka Client Performance