Jump to: navigation, search

Difference between revisions of "Zaqar/specs/api/v1/marconi-config"

(Description)
(Description)
Line 20: Line 20:
 
This variable controls:
 
This variable controls:
 
* The max integral value of the URI parameter "limit" a client can use in a [[Marconi/specs/api/v1#List Queues]] request URI, thus, the maxinum number of queues a client can list one time.  The default value is 20, which means, a request like the following:
 
* The max integral value of the URI parameter "limit" a client can use in a [[Marconi/specs/api/v1#List Queues]] request URI, thus, the maxinum number of queues a client can list one time.  The default value is 20, which means, a request like the following:
 +
  
 
   GET /v1/queues?limit=30
 
   GET /v1/queues?limit=30
  
will result in '''400 Bad Request''' response.
+
will result in a '''400 Bad Request''' response.
  
 
<tt>message_paging_uplimit</tt>
 
<tt>message_paging_uplimit</tt>
Line 44: Line 45:
 
   ]
 
   ]
  
will result in '''400 Bad Request''' response.
+
will result in a '''400 Bad Request''' response without any message to be posted.
  
 
* The max integral value of the URI parameter "limit" in a [[Marconi/specs/api/v1#List Messages]] request URI, thus, the maxinum number of messages a client can list one time.  The default value is 20, which means, a request like the following:
 
* The max integral value of the URI parameter "limit" in a [[Marconi/specs/api/v1#List Messages]] request URI, thus, the maxinum number of messages a client can list one time.  The default value is 20, which means, a request like the following:
Line 51: Line 52:
 
   GET /v1/queues/noein/messages?limit=21
 
   GET /v1/queues/noein/messages?limit=21
  
will result in '''400 Bad Request''' response.
+
will result in a '''400 Bad Request''' response.
  
 
* The max integral value of the URI parameter "limit" in a [[Marconi/specs/api/v1#Claim Messages]] request URI, thus, the maxinum number of messages a client can claim one time.  The default value is 20, which means, a request like the following:
 
* The max integral value of the URI parameter "limit" in a [[Marconi/specs/api/v1#Claim Messages]] request URI, thus, the maxinum number of messages a client can claim one time.  The default value is 20, which means, a request like the following:
Line 61: Line 62:
 
   ...
 
   ...
  
will result in '''400 Bad Request''' response.
+
will result in a '''400 Bad Request''' response.
  
 
* The maxinum number of message IDs allowed for the URI parameter "ids" in a [[Marconi/specs/api/v1#Get a Set of Messages by ID]] request URI, thus, the maxinum number of messages a client can fetch one time in a bulk getting.  Note that although this is not a paging API, the URI is usually returned in a message posting's "Location" header.  The default value is 20, which means, a request like the following:
 
* The maxinum number of message IDs allowed for the URI parameter "ids" in a [[Marconi/specs/api/v1#Get a Set of Messages by ID]] request URI, thus, the maxinum number of messages a client can fetch one time in a bulk getting.  Note that although this is not a paging API, the URI is usually returned in a message posting's "Location" header.  The default value is 20, which means, a request like the following:
Line 68: Line 69:
 
   GET /v1/queues/{queue_name}/messages?ids=msg1,msg2,...,msg21
 
   GET /v1/queues/{queue_name}/messages?ids=msg1,msg2,...,msg21
  
will result in '''400 Bad Request''' response.
+
will result in a '''400 Bad Request''' response.
  
 
* The maxinum number of message IDs allowed for the URI parameter "ids" in a [[Marconi/specs/api/v1#Delete a Set of Messages by ID]] request URI, thus, the maxinum number of messages a client can delete one time in a bulk deletion.  Note that although this is not a paging API, the URI is usually returned in a message posting's "Location" header.  The default value is 20, which means, a request like the following:
 
* The maxinum number of message IDs allowed for the URI parameter "ids" in a [[Marconi/specs/api/v1#Delete a Set of Messages by ID]] request URI, thus, the maxinum number of messages a client can delete one time in a bulk deletion.  Note that although this is not a paging API, the URI is usually returned in a message posting's "Location" header.  The default value is 20, which means, a request like the following:
Line 75: Line 76:
 
   DELETE /v1/queues/{queue_name}/messages?ids=msg1,msg2,...,msg21
 
   DELETE /v1/queues/{queue_name}/messages?ids=msg1,msg2,...,msg21
  
will result in '''400 Bad Request''' response.
+
will result in a '''400 Bad Request''' response.
 +
 
 +
<tt>message_ttl_max</tt>
 +
 
 +
This variable controls:
 +
 
 +
* The maxinum integral value of the "ttl" fields allowed for each message in a [[Marconi/specs/api/v1#Post Message(s)]] request, thus, the longest Time-To-Live (in seconds) a message can possibly have.  Note that the minimal TTL is 60s.  The default maximal is 1209600s, 14 days.  Which means, a request like the following:
 +
 
 +
 
 +
  POST /v1/queues/noein/messages HTTP/1.1
 +
  Host: marconi.example.com
 +
 
 +
  ...
 +
 
 +
  [
 +
    { "ttl": 300, "body": "msg1" },
 +
    { "ttl": 1300000, "body": "msg2" },
 +
    ...
 +
 
 +
    { "ttl": 300, "body": "msg10" }
 +
  ]
 +
 
 +
will result in a '''400 Bad Request''' response without any message to be posted.

Revision as of 16:26, 14 August 2013

Marconi API Limits

Config Options & Default Values:

The following limits can be changed in marconi.conf, under the [limits:transport] section.

  • queue_paging_uplimit – 20
  • message_paging_uplimit – 20
  • message_ttl_max – 1209600 (seconds, 14 days)
  • claim_ttl_max – 43200 (seconds, 12 hours)
  • claim_grace_max – 43200 (seconds, 12 hours)
  • metadata_size_uplimit – 65536 (bytes, 64 KiB)
  • message_size_uplimit – 262144 (bytes, 256 KiB)
Description

queue_paging_uplimit

This variable controls:

  • The max integral value of the URI parameter "limit" a client can use in a Marconi/specs/api/v1#List Queues request URI, thus, the maxinum number of queues a client can list one time. The default value is 20, which means, a request like the following:


 GET /v1/queues?limit=30

will result in a 400 Bad Request response.

message_paging_uplimit

This variable controls the following API endpoints:

  • The maxinum items a client can put in a Marconi/specs/api/v1#Post Message(s) request's JSON array, thus, the maxinum number of messages a client can post one time. The default value is 20, which means, a request like the following:


 POST /v1/queues/noein/messages HTTP/1.1
 Host: marconi.example.com
 
 ...
 
 [
   { "ttl": 300, "body": "msg1" },
   { "ttl": 300, "body": "msg2" },
   ...
 
   { "ttl": 300, "body": "msg21" }
 ]

will result in a 400 Bad Request response without any message to be posted.

  • The max integral value of the URI parameter "limit" in a Marconi/specs/api/v1#List Messages request URI, thus, the maxinum number of messages a client can list one time. The default value is 20, which means, a request like the following:


 GET /v1/queues/noein/messages?limit=21

will result in a 400 Bad Request response.

  • The max integral value of the URI parameter "limit" in a Marconi/specs/api/v1#Claim Messages request URI, thus, the maxinum number of messages a client can claim one time. The default value is 20, which means, a request like the following:


 POST /v1/queues/noein/claims?limit=22
 Content-Type: application/json
 
 ...

will result in a 400 Bad Request response.

  • The maxinum number of message IDs allowed for the URI parameter "ids" in a Marconi/specs/api/v1#Get a Set of Messages by ID request URI, thus, the maxinum number of messages a client can fetch one time in a bulk getting. Note that although this is not a paging API, the URI is usually returned in a message posting's "Location" header. The default value is 20, which means, a request like the following:


 GET /v1/queues/{queue_name}/messages?ids=msg1,msg2,...,msg21

will result in a 400 Bad Request response.

  • The maxinum number of message IDs allowed for the URI parameter "ids" in a Marconi/specs/api/v1#Delete a Set of Messages by ID request URI, thus, the maxinum number of messages a client can delete one time in a bulk deletion. Note that although this is not a paging API, the URI is usually returned in a message posting's "Location" header. The default value is 20, which means, a request like the following:


 DELETE /v1/queues/{queue_name}/messages?ids=msg1,msg2,...,msg21

will result in a 400 Bad Request response.

message_ttl_max

This variable controls:

  • The maxinum integral value of the "ttl" fields allowed for each message in a Marconi/specs/api/v1#Post Message(s) request, thus, the longest Time-To-Live (in seconds) a message can possibly have. Note that the minimal TTL is 60s. The default maximal is 1209600s, 14 days. Which means, a request like the following:


 POST /v1/queues/noein/messages HTTP/1.1
 Host: marconi.example.com
 
 ...
 
 [
   { "ttl": 300, "body": "msg1" },
   { "ttl": 1300000, "body": "msg2" },
   ...
 
   { "ttl": 300, "body": "msg10" }
 ]

will result in a 400 Bad Request response without any message to be posted.