Pulsar isolation

    To enforce resource isolation, you can use the Pulsar isolation policy, which allows you to allocate resources (broker and bookie) for the namespace.

    In Pulsar, when namespaces (more specifically, namespace bundles) are assigned dynamically to brokers, the namespace isolation policy limits the set of brokers that can be used for assignment. Before topics are assigned to brokers, you can set the namespace isolation policy with a primary or a secondary regex to select desired brokers.

    You can set a namespace isolation policy for a cluster using one of the following methods.

    • REST API
    • Java admin API

    Example

    PUT /admin/v2/namespaces/{tenant}/{namespace}

    For how to set namespace isolation policy using Java admin API, see .

    Bookie isolation

    You can set a bookie affinity group using one of the following methods.

    • Admin CLI
    • Java admin API

    For more information about the command pulsar-admin namespaces set-bookie-affinity-group options, see .

    Example

    note
    • Do not set a bookie rack name to slash (/) or an empty string ("") if you use Pulsar earlier than 2.7.5, 2.8.3, and 2.9.2. If you use Pulsar 2.7.5, 2.8.3, 2.9.2 or later versions, it falls back to /default-rack or .
    • When RackawareEnsemblePlacementPolicy is enabled, the rack name is not allowed to contain slash (/) except for the beginning and end of the rack name string. For example, rack name like /rack0 is okay, but /rack/0 is not allowed.

    For how to set bookie affinity group for a namespace using Java admin API, see .