def subscribe(self, frame):
ack = frame.headers.get('<STR_LIT>')<EOL>reliable = ack and ack.lower() == '<STR_LIT>'<EOL>self.engine.connection.reliable_subscriber = reliable<EOL>dest = frame.headers.get('<STR_LIT>')<EOL>if not dest:<EOL><INDENT>raise ProtocolError('<STR_LIT>')<EOL><DEDENT>if dest.startswith('<STR_LIT>'):<EOL><INDENT>self.engine.queue_manager.subscribe(self.engine.connection, dest)<EOL><DEDENT>else:<EOL><INDENT>self.engine.topic_manager.subscribe(self.engine.connection, dest)<EOL><DEDENT>
Handle the SUBSCRIBE command: Adds this connection to destination.