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

Introduce deprecated features management #7390

Merged
merged 1 commit into from Jun 6, 2023

Conversation

dumbbell
Copy link
Member

@dumbbell dumbbell commented Feb 22, 2023

This introduces a way to declare deprecated features in the code, not only in our communication. The new module allows to disallow the use of a deprecated feature and/or warn the user when he relies on such a feature.

Why

Currently, we only tell people about deprecated features through blog posts and the mailing-list. This might be insufficiant for our users that a feature they use will be removed in a future version:

  • They may not read our blog or mailing-list
  • They may not understand that they use such a deprecated feature
  • They might wait for the big removal before they plan testing
  • They might not take it seriously enough

The idea behind this patch is to increase the chance that users notice that they are using something which is about to be dropped from RabbitMQ. Anopther benefit is that they should be able to test how RabbitMQ will behave in the future before the actual removal. This should allow them to test and plan changes.

How

When a feature is deprecated in other large projects (such as FreeBSD where I took the idea from), it goes through a lifecycle:

  1. The feature is still available, but users get a warning somehow when they use it. They can disable it to test.
  2. The feature is still available, but disabled out-of-the-box. Users can re-enable it (and get a warning).
  3. The feature is disconnected from the build. Therefore, the code behind it is still there, but users have to recompile the thing to be able to use it.
  4. The feature is removed from the source code. Users have to adapt or they can't upgrade anymore.

The solution in this patch offers the same lifecycle. A deprecated feature will be in one of these deprecation phases:

  1. permitted_by_default: The feature is available. Users get a warning if they use it. They can disable it from the configuration.
  2. denied_by_default: The feature is available but disabled by default. Users get an error if they use it and RabbitMQ behaves like the feature is removed. They can re-enable is from the configuration and get a warning.
  3. disconnected: The feature is present in the source code, but is disabled and can't be re-enabled without recompiling RabbitMQ. Users get the same behavior as if the code was removed.
  4. removed: The feature's code is gone.

The whole thing is based on the feature flags subsystem, but it has the following differences with other feature flags:

  • The semantic is reversed: the feature flag behind a deprecated feature is disabled when the deprecated feature is permitted, or enabled when the deprecated feature is denied.
  • The feature flag behind a deprecated feature is enabled out-of-the-box (meaning the deprecated feature is denied):
    • if the deprecation phase is permitted_by_default and the configuration denies the deprecated feature
    • if the deprecation phase is denied_by_default and the configuration doesn't permit the deprecated feature
    • if the deprecation phase is disconnected or removed
  • Feature flags behind deprecated feature don't appear in feature flags listings.

Otherwise, deprecated features' feature flags are managed like other feature flags, in particular inside clusters.

To declare a deprecated feature:

-rabbit_deprecated_feature(
   {my_deprecated_feature,
    #{deprecation_phase => permitted_by_default,
      msgs => #{when_permitted => "This feature will be removed in RabbitMQ X.0"}
     }}).

Then, to check the state of a deprecated feature in the code:

case rabbit_deprecated_features:is_permitted(my_deprecated_feature) of
    true ->
        %% The deprecated feature is still permitted.
        ok;
    false ->
        %% The deprecated feature is gone or should be considered
        %% unavailable.
        error
end.

Warnings and errors are logged automatically. A message is generated automatically, but it is possible to define a message in the deprecated feature flag declaration like in the example above.

Here is an example of a logged warning that was generated automatically:

Feature `my_deprecated_feature` is deprecated.
By default, this feature can still be used for now.
Its use will not be permitted by default in a future minor RabbitMQ version and the feature will be removed from a future major RabbitMQ version; actual versions to be determined.
To continue using this feature when it is not permitted by default, set the following parameter in your configuration:
    "deprecated_features.permit.my_deprecated_feature = true"
To test RabbitMQ as if the feature was removed, set this in your configuration:
    "deprecated_features.permit.my_deprecated_feature = false"

To override the default state of permitted_by_default and denied_by_default deprecation phases, users can set the following configuration:

# In rabbitmq.conf:
deprecated_features.permit.my_deprecated_feature = true # Or false

The actual behavior protected by a deprecated feature check is out of scope for this subsystem. It is the repsonsibility of each deprecated feature code to determine what to do when the deprecated feature is denied.

@dumbbell dumbbell self-assigned this Feb 22, 2023
@dumbbell
Copy link
Member Author

dumbbell commented Feb 22, 2023

This is a work in progress, but here is what it could look like:

First, you declare a deprecated feature:

-rabbit_deprecated_feature(
   {classic_mirrored_queues,
    #{deprecation_phase => optout,
      warning =>
      "Classic mirrored queues are deprecated and will go away in RabbitMQ 4.x",
      doc_url => "https://blog.rabbitmq.com/posts/2021/08/4.0-deprecation-announcements/"
     }}).

The deprecation phases would be:

  1. opt-out; the feature is still enabled by default and can be disabled in the configuration
  2. opt-in; the feature is disabled by default and can be re-enabled in the configuration
  3. disconnected; the feature is disabled and can't be re-enabled, except by recompiling RabbitMQ or the plugin
  4. removed; the feature is gone entirely; we need to keep the declaration because for the same purpose we have required feature flags

Then in the code, we can verify if the feature is allowed to be used:

%% Example with `rabbit_mirror_queue_misc:validate_policy/1
validate_policy(KeyList) ->
    FeatureName = classic_mirrored_queues,
    case rabbit_deprecated_features:is_permitted(FeatureName) of
        false ->
            Warning = rabbit_deprecated_features:get_warning(FeatureName),
            {error, "~ts", [Warning]};
        true ->
            Mode = proplists:get_value(<<"ha-mode">>, KeyList, none),
            Params = proplists:get_value(<<"ha-params">>, KeyList, none),
            ...

Calling rabbit_deprecated_features:is_permitted/1 would log a warning on a regular basis, say once a day.

With this example, the warning is also returned as an error when someone tries to add an HA policy. For instance, in the management UI:

management

@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch 5 times, most recently from 79d96d6 to 0a976cc Compare February 24, 2023 15:18
@mergify mergify bot added the bazel label Feb 24, 2023
@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch 2 times, most recently from ea400f1 to 177af61 Compare February 28, 2023 15:30
@mergify mergify bot added the make label Feb 28, 2023
@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch from 177af61 to fbe0161 Compare February 28, 2023 15:34
@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch 4 times, most recently from cd386d5 to 76ed380 Compare March 1, 2023 11:59
@dumbbell
Copy link
Member Author

dumbbell commented Mar 1, 2023

As an example, here is a branch where classic mirrored queues are deprecated:
https://github.com/rabbitmq/rabbitmq-server/tree/deprecate-classic-mirrored-queues

@dumbbell dumbbell marked this pull request as ready for review March 1, 2023 12:40
@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch from 76ed380 to 953439f Compare March 1, 2023 14:37
deps/rabbit/docs/rabbitmq.conf.example Outdated Show resolved Hide resolved
deps/rabbit/src/rabbit_deprecated_features.erl Outdated Show resolved Hide resolved
deps/rabbit/src/rabbit_deprecated_features.erl Outdated Show resolved Hide resolved
deps/rabbit/src/rabbit_deprecated_features.erl Outdated Show resolved Hide resolved
deps/rabbit/src/rabbit_deprecated_features.erl Outdated Show resolved Hide resolved
@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch 3 times, most recently from 9f2216e to 5701cdb Compare March 2, 2023 16:21
@dumbbell dumbbell marked this pull request as draft March 3, 2023 07:14
@dumbbell dumbbell force-pushed the introduce-deprecation-feature-flags branch 2 times, most recently from 1ebed0c to 220fc9a Compare March 3, 2023 16:48
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Global QoS, where a single shared prefetch is used for an entire
channel, is not recommended practice. Per-consumer QoS (non-global)
should be set instead.

[How]
The global QoS setting is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.global_qos = false

Global QoS can be turned off anytime, there are no conditions to do
that.

Once global QoS is turned off, the prefetch setting will always be
considered as non-global (i.e. per-consumer). A warning message will be
logged if the default prefetch setting enables global QoS or anytime a
client requests a global QoS on the channel.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
RAM nodes provide no safety at all and they lost interest with recent
fast storage solutions.

[How]
RAM nodes are marked as deprecated in the code using the Deprecated
features subsystem (based on feature flags). See pull request #7390 for
a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.ram_node_type = false

To turn off RAM nodes, there must be no RAM nodes in the cluster.

Once RAM nodes are turned off, an existing node previously created as a
RAM node will change itself to a disc node during boot. If a new node is
added to the cluster using peer discovery or the CLI, it will be as a
disc node and a warning will be logged if the requested node type is
RAM.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Classic queue mirroring will be removed in RabbitMQ 4.0. Quorum queues
provide a better safer alternative. Non-replicated classic queues remain
supported.

[How]
Classic queue mirroring is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.classic_queue_mirroring = false

To turn off classic queue mirroring, there must be no classic mirrored
queues declared and no HA policy defined.

Once classic queue mirroring is turned off, users will not be able to
declare HA policies. Trying to do that from the CLI or the management
API will be rejected with a warning in the logs. This impacts clustering
too: a node with classic queue mirroring turned off will only cluster
with another node which has no HA policy or has classic queue mirroring
turned off.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.

V2: Renamed the deprecated feature from `classic_mirrored_queues` to
    `classic_queue_mirroring` to better reflect the intention. Otherwise
    it could be unclear is only the mirroring property is
    deprecated/removed or classic queues entirely.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Management metrics collection will be removed in RabbitMQ 4.0. The
prometheus plugin provides a better and more scalable alternative.

[How]
The management metrics collection is marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.management_metrics_collection = false

Management metrics collection can be turned off anytime, there are no
conditions to do that.

Once management metrics collection is turned off, the management API
will not report any metrics and the UI will show empty graphs.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Global QoS, where a single shared prefetch is used for an entire
channel, is not recommended practice. Per-consumer QoS (non-global)
should be set instead.

[How]
The global QoS setting is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.global_qos = false

Global QoS can be turned off anytime, there are no conditions to do
that.

Once global QoS is turned off, the prefetch setting will always be
considered as non-global (i.e. per-consumer). A warning message will be
logged if the default prefetch setting enables global QoS or anytime a
client requests a global QoS on the channel.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
RAM nodes provide no safety at all and they lost interest with recent
fast storage solutions.

[How]
RAM nodes are marked as deprecated in the code using the Deprecated
features subsystem (based on feature flags). See pull request #7390 for
a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.ram_node_type = false

To turn off RAM nodes, there must be no RAM nodes in the cluster.

Once RAM nodes are turned off, an existing node previously created as a
RAM node will change itself to a disc node during boot. If a new node is
added to the cluster using peer discovery or the CLI, it will be as a
disc node and a warning will be logged if the requested node type is
RAM.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Classic queue mirroring will be removed in RabbitMQ 4.0. Quorum queues
provide a better safer alternative. Non-replicated classic queues remain
supported.

[How]
Classic queue mirroring is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.classic_queue_mirroring = false

To turn off classic queue mirroring, there must be no classic mirrored
queues declared and no HA policy defined.

Once classic queue mirroring is turned off, users will not be able to
declare HA policies. Trying to do that from the CLI or the management
API will be rejected with a warning in the logs. This impacts clustering
too: a node with classic queue mirroring turned off will only cluster
with another node which has no HA policy or has classic queue mirroring
turned off.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.

V2: Renamed the deprecated feature from `classic_mirrored_queues` to
    `classic_queue_mirroring` to better reflect the intention. Otherwise
    it could be unclear is only the mirroring property is
    deprecated/removed or classic queues entirely.
dumbbell added a commit that referenced this pull request Jul 4, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Management metrics collection will be removed in RabbitMQ 4.0. The
prometheus plugin provides a better and more scalable alternative.

[How]
The management metrics collection is marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.management_metrics_collection = false

Management metrics collection can be turned off anytime, there are no
conditions to do that.

Once management metrics collection is turned off, the management API
will not report any metrics and the UI will show empty graphs.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Global QoS, where a single shared prefetch is used for an entire
channel, is not recommended practice. Per-consumer QoS (non-global)
should be set instead.

[How]
The global QoS setting is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.global_qos = false

Global QoS can be turned off anytime, there are no conditions to do
that.

Once global QoS is turned off, the prefetch setting will always be
considered as non-global (i.e. per-consumer). A warning message will be
logged if the default prefetch setting enables global QoS or anytime a
client requests a global QoS on the channel.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
RAM nodes provide no safety at all and they lost interest with recent
fast storage solutions.

[How]
RAM nodes are marked as deprecated in the code using the Deprecated
features subsystem (based on feature flags). See pull request #7390 for
a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.ram_node_type = false

To turn off RAM nodes, there must be no RAM nodes in the cluster.

Once RAM nodes are turned off, an existing node previously created as a
RAM node will change itself to a disc node during boot. If a new node is
added to the cluster using peer discovery or the CLI, it will be as a
disc node and a warning will be logged if the requested node type is
RAM.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Classic queue mirroring will be removed in RabbitMQ 4.0. Quorum queues
provide a better safer alternative. Non-replicated classic queues remain
supported.

[How]
Classic queue mirroring is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.classic_queue_mirroring = false

To turn off classic queue mirroring, there must be no classic mirrored
queues declared and no HA policy defined.

Once classic queue mirroring is turned off, users will not be able to
declare HA policies. Trying to do that from the CLI or the management
API will be rejected with a warning in the logs. This impacts clustering
too: a node with classic queue mirroring turned off will only cluster
with another node which has no HA policy or has classic queue mirroring
turned off.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.

V2: Renamed the deprecated feature from `classic_mirrored_queues` to
    `classic_queue_mirroring` to better reflect the intention. Otherwise
    it could be unclear is only the mirroring property is
    deprecated/removed or classic queues entirely.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Management metrics collection will be removed in RabbitMQ 4.0. The
prometheus plugin provides a better and more scalable alternative.

[How]
The management metrics collection is marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.management_metrics_collection = false

Management metrics collection can be turned off anytime, there are no
conditions to do that.

Once management metrics collection is turned off, the management API
will not report any metrics and the UI will show empty graphs.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Global QoS, where a single shared prefetch is used for an entire
channel, is not recommended practice. Per-consumer QoS (non-global)
should be set instead.

[How]
The global QoS setting is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.global_qos = false

Global QoS can be turned off anytime, there are no conditions to do
that.

Once global QoS is turned off, the prefetch setting will always be
considered as non-global (i.e. per-consumer). A warning message will be
logged if the default prefetch setting enables global QoS or anytime a
client requests a global QoS on the channel.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Global QoS, where a single shared prefetch is used for an entire
channel, is not recommended practice. Per-consumer QoS (non-global)
should be set instead.

[How]
The global QoS setting is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.global_qos = false

Global QoS can be turned off anytime, there are no conditions to do
that.

Once global QoS is turned off, the prefetch setting will always be
considered as non-global (i.e. per-consumer). A warning message will be
logged if the default prefetch setting enables global QoS or anytime a
client requests a global QoS on the channel.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
RAM nodes provide no safety at all and they lost interest with recent
fast storage solutions.

[How]
RAM nodes are marked as deprecated in the code using the Deprecated
features subsystem (based on feature flags). See pull request #7390 for
a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.ram_node_type = false

To turn off RAM nodes, there must be no RAM nodes in the cluster.

Once RAM nodes are turned off, an existing node previously created as a
RAM node will change itself to a disc node during boot. If a new node is
added to the cluster using peer discovery or the CLI, it will be as a
disc node and a warning will be logged if the requested node type is
RAM.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Classic queue mirroring will be removed in RabbitMQ 4.0. Quorum queues
provide a better safer alternative. Non-replicated classic queues remain
supported.

[How]
Classic queue mirroring is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.classic_queue_mirroring = false

To turn off classic queue mirroring, there must be no classic mirrored
queues declared and no HA policy defined.

Once classic queue mirroring is turned off, users will not be able to
declare HA policies. Trying to do that from the CLI or the management
API will be rejected with a warning in the logs. This impacts clustering
too: a node with classic queue mirroring turned off will only cluster
with another node which has no HA policy or has classic queue mirroring
turned off.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.

V2: Renamed the deprecated feature from `classic_mirrored_queues` to
    `classic_queue_mirroring` to better reflect the intention. Otherwise
    it could be unclear is only the mirroring property is
    deprecated/removed or classic queues entirely.
dumbbell added a commit that referenced this pull request Jul 5, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
RAM nodes provide no safety at all and they lost interest with recent
fast storage solutions.

[How]
RAM nodes are marked as deprecated in the code using the Deprecated
features subsystem (based on feature flags). See pull request #7390 for
a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.ram_node_type = false

RAM nodes can be turned off anytime, there are no conditions to do that.

Once RAM nodes are turned off, an existing node previously created as a
RAM node will change itself to a disc node during boot. If a new node is
added to the cluster using peer discovery or the CLI, it will be as a
disc node and a warning will be logged if the requested node type is
RAM. The `change_cluster_node_type` CLI command will reject a change to
a RAM node with an error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
Classic queue mirroring will be removed in RabbitMQ 4.0. Quorum queues
provide a better safer alternative. Non-replicated classic queues remain
supported.

[How]
Classic queue mirroring is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.classic_queue_mirroring = false

To turn off classic queue mirroring, there must be no classic mirrored
queues declared and no HA policy defined. A node with classic mirrored
queues will refuse to start if classic queue mirroring is turned off.

Once classic queue mirroring is turned off, users will not be able to
declare HA policies. Trying to do that from the CLI or the management
API will be rejected with a warning in the logs. This impacts clustering
too: a node with classic queue mirroring turned off will only cluster
with another node which has no HA policy or has classic queue mirroring
turned off.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.

V2: Renamed the deprecated feature from `classic_mirrored_queues` to
    `classic_queue_mirroring` to better reflect the intention. Otherwise
    it could be unclear is only the mirroring property is
    deprecated/removed or classic queues entirely.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
Management metrics collection will be removed in RabbitMQ 4.0. The
prometheus plugin provides a better and more scalable alternative.

[How]
The management metrics collection is marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.management_metrics_collection = false

Management metrics collection can be turned off anytime, there are no
conditions to do that.

Once management metrics collection is turned off, the management API
will not report any metrics and the UI will show empty graphs.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
Global QoS, where a single shared prefetch is used for an entire
channel, is not recommended practice. Per-consumer QoS (non-global)
should be set instead.

[How]
The global QoS setting is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.global_qos = false

Global QoS can be turned off anytime, there are no conditions to do
that.

Once global QoS is turned off, the prefetch setting will always be
considered as non-global (i.e. per-consumer). A warning message will be
logged if the default prefetch setting enables global QoS or anytime a
client requests a global QoS on the channel.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
RAM nodes provide no safety at all and they lost interest with recent
fast storage solutions.

[How]
RAM nodes are marked as deprecated in the code using the Deprecated
features subsystem (based on feature flags). See pull request #7390 for
a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.ram_node_type = false

RAM nodes can be turned off anytime, there are no conditions to do that.

Once RAM nodes are turned off, an existing node previously created as a
RAM node will change itself to a disc node during boot. If a new node is
added to the cluster using peer discovery or the CLI, it will be as a
disc node and a warning will be logged if the requested node type is
RAM. The `change_cluster_node_type` CLI command will reject a change to
a RAM node with an error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
Classic queue mirroring will be removed in RabbitMQ 4.0. Quorum queues
provide a better safer alternative. Non-replicated classic queues remain
supported.

[How]
Classic queue mirroring is marked as deprecated in the code using the
Deprecated features subsystem (based on feature flags). See #7390 for a
description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.classic_queue_mirroring = false

To turn off classic queue mirroring, there must be no classic mirrored
queues declared and no HA policy defined. A node with classic mirrored
queues will refuse to start if classic queue mirroring is turned off.

Once classic queue mirroring is turned off, users will not be able to
declare HA policies. Trying to do that from the CLI or the management
API will be rejected with a warning in the logs. This impacts clustering
too: a node with classic queue mirroring turned off will only cluster
with another node which has no HA policy or has classic queue mirroring
turned off.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.

V2: Renamed the deprecated feature from `classic_mirrored_queues` to
    `classic_queue_mirroring` to better reflect the intention. Otherwise
    it could be unclear is only the mirroring property is
    deprecated/removed or classic queues entirely.
dumbbell added a commit that referenced this pull request Jul 6, 2023
[Why]
Transient queues are queues that are removed upon node restart. An
application developer can't rely on such an arbitrary event to reason
about a queue's lifetime.

The only exception are exclusive transient queues which have a lifetime
linked to that of a client connection.

[How]
Non-exclusive transient queues are marked as deprecated in the code
using the Deprecated features subsystem (based on feature flags). See
pull request #7390 for a description of that subsystem.

To test RabbitMQ behavior as if the feature was removed, the following
configuration setting can be used:
deprecated_features.permit.transient_nonexcl_queues = false

Non-exclusive transient queues can be turned off anytime, there are no
conditions to do that.

Once non-exclusive transient queues are turned off, declaring a new
queue with those arguments will be rejected with a protocol error.

Note that given the marketing calendar, the deprecated feature will go
directly from "permitted by default" to "removed" in RabbitMQ 4.0. It
won't go through the gradual deprecation process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants