def prepare_message(self, message_data, delivery_mode, priority=0, content_type=None, content_encoding=None): return {"body": message_data, "delivery_tag": gen_unique_id(), "priority": priority or 0, "content-encoding": content_encoding, "content-type": content_type}
def _generate_consumer_tag(self): """Generate a unique consumer tag. :rtype string: """ return "%s.%s-%s" % (self.__class__.__module__, self.__class__.__name__, gen_unique_id())
def _generate_consumer_tag(self): """Generate a unique consumer tag. :rtype string: """ return "%s.%s-%s" % ( self.__class__.__module__, self.__class__.__name__, gen_unique_id())
def prepare_message(self, message_data, delivery_mode, priority=0, content_type=None, content_encoding=None): return { "body": message_data, "delivery_tag": gen_unique_id(), "priority": priority or 0, "content-encoding": content_encoding, "content-type": content_type }