#NEWLINE# def ack( self , id , subscription , transaction = None ) : #NEWLINE# #INDENT# "\n        Acknowledge 'consumption' of a message by id.\n\n        :param id: identifier of the message\n        :param subscription: the subscription this message is associated with\n        :param transaction: include the acknowledgement in the specified transaction\n        " #NEWLINE# assert ( id is not None ) , "'id' is required" #NEWLINE# assert ( subscription is not None ) , "'subscription' is required" #NEWLINE# headers = { #NEWLINE# #INDENT# HDR_MESSAGE_ID : id , #NEWLINE# HDR_SUBSCRIPTION : subscription , #NEWLINE# #UNINDENT# } #NEWLINE# if id : #NEWLINE# #INDENT# headers [ HDR_TRANSACTION ] = transaction #NEWLINE# #UNINDENT# self . send_frame ( CMD_ACK , headers )