Also all these ifdefs should not be required.  Just check if the queue is registered.  That allows us to transparently use different sonar modules behind the scenes.