@synchronized(lock)<EOL><INDENT>def send(self, message):<DEDENT>
dest = message.headers.get('<STR_LIT>')<EOL>if not dest:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>" % message)<EOL><DEDENT>message.cmd = '<STR_LIT:message>'<EOL>message.headers.setdefault('<STR_LIT>', str(uuid.uuid4()))<EOL>subscribers = [s for s in self._queues[dest]<EOL>if s not in self._pending]<EOL>if not subscribers:<EOL><INDENT>self.log.debug(<EOL>"<STR_LIT>" % (message, dest))<EOL>self.store.enqueue(dest, message)<EOL><DEDENT>else:<EOL><INDENT>selected = self.subscriber_scheduler.choice(subscribers, message)<EOL>self.log.debug("<STR_LIT>" %<EOL>(message, selected))<EOL>self._send_frame(selected, message)<EOL><DEDENT>
Sends a MESSAGE frame to an eligible subscriber connection.

Note that this method will modify the incoming message object to 
add a message-id header (if not present) and to change the command
to 'MESSAGE' (if it is not).

@param message: The message frame.
@type message: C{stompclient.frame.Frame}