#NEWLINE# def subscribe( self , destination , id = None , ack = 'auto' , headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , **keyword_headers ) : #NEWLINE# #INDENT# '\n        Subscribe to a destination.\n\n        :param destination: the topic or queue to subscribe to\n        :param id: a unique id to represent the subscription\n        :param ack: acknowledgement mode, either auto, client, or client-individual\n            (see http://stomp.github.io/stomp-specification-1.2.html#SUBSCRIBE_ack_Header)\n            for more information\n        :param headers: a map of any additional headers the broker requires\n        :param keyword_headers: any additional headers the broker requires\n        ' #NEWLINE# assert ( destination is not None ) , "'destination' is required" #NEWLINE# headers = utils . merge_headers ( [ headers , keyword_headers ] ) #NEWLINE# headers [ HDR_DESTINATION ] = destination #NEWLINE# if id : #NEWLINE# #INDENT# headers [ HDR_ID ] = id #NEWLINE# #UNINDENT# headers [ HDR_ACK ] = ack #NEWLINE# self . send_frame ( CMD_SUBSCRIBE , headers )