Skip to content

Remove set_stream_retention_policy command #13360

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

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 1 addition & 13 deletions deps/rabbit/docs/rabbitmq-streams.8
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.\"
.\" Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
.\"
.Dd June 22, 2023
.Dd February 18, 2025
.Dt RABBITMQ-STREAMS 8
.Os "RabbitMQ Server"
.Sh NAME
Expand Down Expand Up @@ -129,18 +129,6 @@ Example:
.Dl rabbitmq-streams restart_stream --vhost Qo a-vhost Qc Qo a-stream Qc --preferred-leader-node Qo node
.\" ------------------------------------
.El
.Ss Policies
.Bl -tag -width Ds
.\" ------------------------------------
.It Cm set_stream_retention_policy Ar stream Ar policy Fl -vhost Ar virtual-host
.Pp
Set the retention policy of a stream.
.Pp
Example:
.Sp
.Dl rabbitmq-streams set_stream_retention_policy --vhost Qo a-vhost Qc Qo a-stream Qc Qo a-policy Qc
.\" ------------------------------------
.El
.Ss Stream plugin
.Bl -tag -width Ds
.\" ------------------------------------------------------------------
Expand Down
19 changes: 0 additions & 19 deletions deps/rabbit/src/rabbit_stream_queue.erl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@

-export([list_with_minimum_quorum/0]).

-export([set_retention_policy/3]).
-export([restart_stream/3,
add_replica/3,
delete_replica/3,
Expand Down Expand Up @@ -1002,24 +1001,6 @@ update_leader_pid(Pid, #stream_client{} = State) ->
state_info(_) ->
#{}.

set_retention_policy(Name, VHost, Policy) ->
case rabbit_amqqueue:check_max_age(Policy) of
{error, _} = E ->
E;
MaxAge ->
QName = queue_resource(VHost, Name),
Fun = fun(Q) ->
Conf = amqqueue:get_type_state(Q),
amqqueue:set_type_state(Q, Conf#{max_age => MaxAge})
end,
case rabbit_amqqueue:update(QName, Fun) of
not_found ->
{error, not_found};
_ ->
ok
end
end.

-spec restart_stream(VHost :: binary(), Queue :: binary(),
#{preferred_leader_node => node()}) ->
{ok, node()} |
Expand Down

This file was deleted.

This file was deleted.

Loading