Renaming a Queue

7 views
Skip to first unread message

jvliwanag

unread,
Dec 9, 2011, 3:15:08 AM12/9/11
to ope...@googlegroups.com
Hi,

What is the best procedure for renaming an already loaded queue?

The procedure I have right now is:
1 - Invoke call_queue_config:set_queue from the old name to the new one. (This deletes the old Mnesia entry for the old queue and inserts a new one.)
2 - Invoke queue_manager:load_queue with the new name

What's best to do next? My choices are:
A - call_queue:stop(Pid of old queue) - but wouldn't this end existing calls?
B - migrate the calls from the old call_queue to the new one. (Not yet certain how this is done atomically.) then stop the old one.

Thanks!

Micah

unread,
Dec 9, 2011, 5:46:40 PM12/9/11
to OpenACD
Wait until the old queue is empty, then use call_queue:stop(Pid).

You would lose calls if you did A; when a queue does a graceful end
(exits with reason normal or shutdown) all calls are taken with it.
Any other reason, calls will wait in limbo for the queue to come
back. Since the old name is no exists in the config, the queue
manager can't restart the queue, so the calls wait forever (or until
something else causes an exit).

Unfortunately, there's currently no (easy) way to move a call from one
queue to another.

I've opened an Issue on github describing the scenario.

Micah

Reply all
Reply to author
Forward
0 new messages