Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Clarify which requests relate to which policies

...

The TopicActionsPolicy will be applied:

  • On topic creation, i.e. when processing a CreateTopicsRequest
  • On topic modification
    • Change in topic config, via AdminClient.alterConfigs() (ie. when processing AlterConfigsRequest, for topic configs (this change done as part of this KIP).
    • Adding partitions to topics, via AdminClient.createPartitions() ( i.e. when processing a CreatePartitionsRequest (see KIP-195, but this change done as part of this KIP)
    • Reassigning partitions to brokers, and/or changing the replication factor via AdminClient.reassignPartitions() (when processing ReassignPartitionsRequest (see KIP-179)

On topic deletion The TopicDeletionPolicy will be applied:

  • on topic

...

  • , i.e. when processing a DeleteTopicsRequest.
  • on message deletion, i.e. when processing a DeleteRecordsRequest.

Note: Unlike previous policy interfaces the inner RequestMetadata is an interface rather than a class. This should simplify testing and better permit use sites to, for example, lazily fetch metadata when it's actually required by the policy implementation, rather than eagerly fetch information which the policy didn't actually require.

...