pip/pip-356.md
Replication reads messages from the source cluster, and copies them to the remote cluster.
pulsar.repl.{remote-cluster} on the source cluster. Replicator reads messages relies on this cursor.If you have some older messages to migrate, the steps recommended are below, which was described at pulsar doc.
pulsar-admin topics create-subscription -s pulsar.repl.{remote-cluster} -m earliest <topic>.The steps recommended are difficultly to use, for example:
pulsar.repl.{remote-cluster} manually.pulsar.repl.{remote-cluster} automatically because the Geo-Replication feature is disabled at this moment.Add an optional config(broker level, namespace level, and topic level) to support Geo-Replication starting at the earliest position.
broker.conf
# The position that replication task start at, it can be set to "earliest" or "latest (default)".
replicationStartAt=latest
ServiceConfiguration
@FieldContext(
category = CATEGORY_REPLICATION,
dynamic = true,
doc = "The position that replication task start at, it can be set to earliest or latest (default)."
)
String replicationStartAt = "latest";
V2/Namespaces.java
@POST
@Path("/{tenant}/{namespace}/replicationStartAt")
public void setNamespaceLevelReplicationStartAt(
@PathParam("tenant") String tenant,
@PathParam("namespace") String namespace,
@QueryParam("replicationStartAt") String replicationStartAt) {
...
...
}
V2/PersistentTopics.java
@POST
@Path("/{tenant}/{namespace}/{topic}/replicationStartAt")
public void setNamespaceLevelReplicationStartAt(
@PathParam("tenant") String tenant,
@PathParam("namespace") String namespace,
@PathParam("topic") @Encoded String encodedTopic,
@QueryParam("isGlobal") @DefaultValue("false") boolean isGlobal,
@QueryParam("replicationStartAt") String replicationStartAt) {
...
...
}
Namespaces command
pulsar-admin namespaces set-replication-start-at {earliest|latest} <namespace>
Topics command
pulsar-admin topics set-replication-start-at {earliest|latest} <topic>
Nothing.
Nothing.
Nothing.
Nothing.
You can do upgrading or reverting normally, no specified steps are needed to do.
Nothing.