Hi,
It seems to work for me (using the latest version).
# declare a queue "qq" with max-length and no max-in-memory-length set and send 1000 messages
$ perf-test -qq -u qq -y 0 -C 1000 --queue-args "x-max-length=100"
# check that the queue contains 100 messages, all of them in RAM
$ rabbitmqctl list_queues name messages_ram
name messages messages_ram
qq 100 100
# apply a policy
$ rabbitmqctl set_policy qq-ram "qq" '{"max-in-memory-length": 0}'
# at this point still all messages are in RAM - the policy is applied to the existing queue but not the messages already in it
$ rabbitmqctl list_queues name messages_ram
name messages messages_ram
qq 100 100
# publish another 100 messages (previous messages are pushed out of the queue)
$ perf-test -qq -u qq -y 0 -C 1000 --queue-args "x-max-length=100"
# no messages are in RAM anymore
$ rabbitmqctl list_queues name messages_ram
name messages messages_ram
qq 100 0
Best,