Skip to content

Commit be8658f

Browse files
Queue ownership check: provide more details in the messaage
See #1887 for context. When an exclusive queue is redeclared with the exclusive property set to `false`, the code considers it to be an ownership check. This is a leaked implementation detail that's been around for years, so changing it might do more harm than good. What we can do is provide a bit more information about when the check might fail in the message.
1 parent 4f853ad commit be8658f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rabbit_amqqueue.erl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,9 @@ check_exclusive_access(Q, _ReaderPid, _MatchType) ->
640640
QueueName = amqqueue:get_name(Q),
641641
rabbit_misc:protocol_error(
642642
resource_locked,
643-
"cannot obtain exclusive access to locked ~s",
643+
"cannot obtain exclusive access to locked ~s. It could be originally "
644+
"declared on another connection or the exclusive property value does not "
645+
"match the original declaration.",
644646
[rabbit_misc:rs(QueueName)]).
645647

646648
-spec with_exclusive_access_or_die(name(), pid(), qfun(A)) ->

0 commit comments

Comments
 (0)