def send_queue_message(self, queue_name, message=None): ''' Sends a message into the specified queue. The limit to the number of messages which may be present in the topic is governed by the message size the MaxTopicSizeInMegaBytes. If this message will cause the queue to exceed its quota, a quota exceeded error is returned and the message will be rejected. queue_name: Name of the queue. message: Message object containing message body and properties. ''' _validate_not_none('queue_name', queue_name) _validate_not_none('message', message) request = HTTPRequest() request.method = 'POST' request.host = self._get_host() request.path = '/' + _str(queue_name) + '/messages' request.headers = message.add_headers(request) request.body = _get_request_body_bytes_only('message.body', message.body) request.path, request.query = _update_request_uri_query(request) request.headers = self._update_service_bus_header(request) self._perform_request(request)
def send_queue_message(self, queue_name, message=None): ''' Sends a message into the specified queue. The limit to the number of messages which may be present in the topic is governed by the message size the MaxTopicSizeInMegaBytes. If this message will cause the queue to exceed its quota, a quota exceeded error is returned and the message will be rejected. queue_name: Name of the queue. message: Message object containing message body and properties. ''' _validate_not_none('queue_name', queue_name) _validate_not_none('message', message) request = HTTPRequest() request.method = 'POST' request.host = self._get_host() request.path = '/' + _str(queue_name) + '/messages' request.headers = message.add_headers(request) request.body = _get_request_body_bytes_only('message.body', message.body) request.path, request.query = _update_request_uri_query(request) request.headers = self._update_service_bus_header(request) self._perform_request(request)