From f605dd9bae5c43811bcf32962825d8f65b60d6e6 Mon Sep 17 00:00:00 2001 From: yangzhenyu Date: Tue, 16 Jan 2018 14:13:16 +0800 Subject: [PATCH] The doc of bp support-md5-of-body blueprint: support-md5-of-body Change-Id: I7238971df284f5cd146e3013092b353649cffc6f --- api-ref/source/messages.inc | 6 ++++-- api-ref/source/samples/claim_messages_response.json | 3 ++- api-ref/source/samples/messages-get-response.json | 3 ++- api-ref/source/samples/messages-list-response.json | 6 ++++-- .../notes/support_md5_of_body-84c1cdc6809b6417.yaml | 9 +++++++++ 5 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 releasenotes/notes/support_md5_of_body-84c1cdc6809b6417.yaml diff --git a/api-ref/source/messages.inc b/api-ref/source/messages.inc index 4b4b6ccc2..aea3a77cf 100644 --- a/api-ref/source/messages.inc +++ b/api-ref/source/messages.inc @@ -174,7 +174,8 @@ URI that the client can use to uniquely identify a message resource and interact with it. ``ttl`` is the TTL that was set on the message when it was posted. The message expires after (ttl - age) seconds. ``age`` is the number of seconds relative to the server's clock. ``body`` is the arbitrary document -that was submitted with the original request to post the message. +that was submitted with the original request to post the message. ``checksum`` +is the hash digest of the ``body``, default algorithm is MD5. @@ -268,7 +269,8 @@ the client can use to uniquely identify a message resource and interact with it. ``ttl`` is the TTL that was set on the message when it was posted. The message expires after (ttl - age) seconds. ``age`` is the number of seconds relative to the server's clock. ``body`` is the arbitrary document that was -submitted with the original request to post the message. +submitted with the original request to post the message. ``checksum`` is the +hash digest of the ``body``, default algorithm is MD5. diff --git a/api-ref/source/samples/claim_messages_response.json b/api-ref/source/samples/claim_messages_response.json index b6347d401..6a3cb698d 100644 --- a/api-ref/source/samples/claim_messages_response.json +++ b/api-ref/source/samples/claim_messages_response.json @@ -6,7 +6,8 @@ }, "age": 239, "href": "/v2/queues/demoqueue/messages/51db6f78c508f17ddc924357?claim_id=51db7067821e727dc24df754", - "ttl": 300 + "ttl": 300, + "checksum": "MD5:82eb2714b7c0237d373947c046cac78d" } ] } diff --git a/api-ref/source/samples/messages-get-response.json b/api-ref/source/samples/messages-get-response.json index 8d9459438..5b7da6557 100644 --- a/api-ref/source/samples/messages-get-response.json +++ b/api-ref/source/samples/messages-get-response.json @@ -7,5 +7,6 @@ "age": 1110, "href": "/v2/queues/beijing/messages/578f0055508f153f256f717f", "id": "578f0055508f153f256f717f", - "ttl": 3600 + "ttl": 3600, + "checksum": "MD5:abf7213555626e29c3cb3e5dc58b3515" } diff --git a/api-ref/source/samples/messages-list-response.json b/api-ref/source/samples/messages-list-response.json index d14049316..662d707c0 100644 --- a/api-ref/source/samples/messages-list-response.json +++ b/api-ref/source/samples/messages-list-response.json @@ -9,7 +9,8 @@ "age": 482, "href": "/v2/queues/beijing/messages/578edfe6508f153f256f717b", "id": "578edfe6508f153f256f717b", - "ttl": 3600 + "ttl": 3600, + "checksum": "MD5:abf7213555626e29c3cb3e5dc58b3515" }, { "body": { @@ -20,7 +21,8 @@ "age": 456, "href": "/v2/queues/beijing/messages/578ee000508f153f256f717d", "id": "578ee000508f153f256f717d", - "ttl": 3600 + "ttl": 3600, + "checksum": "MD5:abf7213555626e29c3cb3e5dc58b3515" } ], "links": [ diff --git a/releasenotes/notes/support_md5_of_body-84c1cdc6809b6417.yaml b/releasenotes/notes/support_md5_of_body-84c1cdc6809b6417.yaml new file mode 100644 index 000000000..c0c31ae36 --- /dev/null +++ b/releasenotes/notes/support_md5_of_body-84c1cdc6809b6417.yaml @@ -0,0 +1,9 @@ +--- +features: + - | + Support non-URL encoded message body checksum function, the default algorithm + is MD5. Back-end support for MongoDB, Redis and Swift. With this feature, when + a user sends a message to the queue, Zaqar calculates a "checksum" value for + the body of the non-URL encoded message, which the user can then get after the + message is got or claimed. Finally, the user can use it to verify that the + body of the newly obtained message is correct.