Beispiel #1
0
 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}
Beispiel #2
0
    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())
Beispiel #3
0
    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())
Beispiel #4
0
 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
     }