Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An interface for filtering out entities (e.g. queues) from the topology recovery cache #1312

Open
michaelklishin opened this issue May 13, 2024 · 0 comments

Comments

@michaelklishin
Copy link
Member

michaelklishin commented May 13, 2024

See #1311 for background.

This is a very basic proposal that would allow to mark certain entities as "unrecoverable", as in, they won't be stored in the topology recovery cache and thus won't be recovered. But also won't keep accumulating if the queues are deleted via a mechanism such as TTL, or another client.

Topology Filtering Interface

ConnectionFactory can accept a TopologyRecoveryEntityFilter (or something like that) that would accept a new methods similar in spirit to Predicate<T> but potentially with a list of parameters, e.g.

class FilterTemporaryQueues implements TopologyRecoveryEntityFilter {
  public boolean shouldRecoverQueue(String virtualHost, String name, boolean durable, boolean autoDelete, boolean exclusive, Map<String, Object> arguments);

  public boolean shouldRecoverExchange(String virtualHost, String name, String exchangeType, boolean durable, boolean autoDelete, Map<String, Object> arguments);
}

  // ...

By default, an "all-accepting" implementation can be used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant