karafka / karafka-web

Web UI for monitoring and managing Karafka consumers
Other
54 stars 8 forks source link

Prevent republishing message to specific topics in explorer tab #346

Closed abmBispo closed 3 months ago

abmBispo commented 4 months ago

Context

To address some compliance concerns, it would be good to prevent users from republishing messages in all topics through the explorer UI as it is today. For DLQ topics it makes sense to have such a capability, but for "main" topics we might want to keep the topic history clean and free from duplicates. In general, it depends on company policies so having the power to disable it is desirable.

Proposal

A republish? method would suffice in the visibility or sanitizing API, such as (extracted from this docs):

class MyCustomVisibilityFilter
  ...
  def republish?(_message)
    false # that would disable all topics' republishing, but maybe we could check for the message/topic to enable it
  end
end