amqp - RabbitMq direct queue that does not accumulate in "Ready" state? -


i require queue not accumulate in "ready" state.

that is, if there subscriber queue, pass messages exchange directly it, , if there no subscriber, waste messages, not accumulate them in "ready" state.

i know exchange of type fanout this, want able use routing key , fanout exchange ignores routing keys. moreove scenario not broadcast one, 1 publisher , 1 (sometimes absent) subscriber.

is possible have direct exchange queue not accumulate messages in "ready" state if there no subscriber?

ok think must declare queue auto-delete true

and set mandatory bit true on basicpublish calls

it seems work far...


Comments