Пример #1
0
    def __init__(self, headers, context, payload):
        headers = copy.copy(headers)
        headers["reply_to"] = str(entry_point.NullEntryPoint())
        headers["destination"] = str(entry_point.NullEntryPoint())
        headers["message_type"] = "notification"
        headers["request_id"] = uuid.uuid4().hex

        if not headers["correlation_id"]:
            headers["correlation_id"] = str(uuid.uuid4())

        super(Notification, self).__init__(headers, context, payload)
Пример #2
0
 def cast(self, correlation_id="", context="", source=""):
     request = self._make_request(context=context,
                                  correlation_id=correlation_id,
                                  reply_to=entry_point.NullEntryPoint(),
                                  source=source)
     self._postprocessor.process(request)
Пример #3
0
 def __init__(self, headers, context, payload):
     headers = copy.copy(headers)
     headers["reply_to"] = str(entry_point.NullEntryPoint())
     headers["destination"] = str(entry_point.NullEntryPoint())
     headers["message_type"] = "notification"
     super(IncomingNotification, self).__init__(headers, context, payload)
Пример #4
0
 def __init__(self, headers, context, payload):
     headers = copy.copy(headers)
     headers["reply_to"] = str(entry_point.NullEntryPoint())
     headers["message_type"] = "error"
     super(BaseError, self).__init__(headers, context, payload)