zaqar/doc/source/install/verify.rst
mohit.mohit2atcognizant.com 31a6325b00 Correcting typo on doc.
Fix for typo in zaqar documentation -:

  * Ref doc link - Doc Link - https://docs.openstack.org/project-install-guide/messaging/newton/verify.html
  * There is typo in string  "X-Auth-ToKen:
  * Instead it should be "X-Auth-Token:
  * This patch fixes the typo for letter k in string Token

Change-Id: I6644b2601754914166d29cf1e1af98f8e8f265e8
Closes-Bug: #1718414
2017-10-09 09:24:45 +00:00

1.3 KiB

Verify operation

Verify operation of the Messaging service by creating messages via curl utility:

$ curl -i -X POST http://ZAQAR_ENDPOINT:8888/v2/queues/samplequeue/messages \
  -d '{"messages": [{"body": {"event": 1}, "ttl": 600}, {"body": {"event": 2}, "ttl": 600}]}' \
  -H "Content-type: application/json" \
  -H "Client-ID: CLIENT_ID" \
  -H "X-Auth-Token: TOKEN"

Replace CLIENT_ID variable with the universally unique identifier (UUID) which can be generated by, for example, uuidgen utility.

Replace TOKEN variable with the authentication token retrieved from Identity service. If you choose not to enable Keystone authentication you won't have to pass a token.

Replace ZAQAR_ENDPOINT variable with the endpoint of Messaging service.

The normal response would be with status code 201 and look something like this:

HTTP/1.1 201 Created
content-length: 135
content-type: application/json; charset=UTF-8
location: http://ZAQAR_ENDPOINT:8888/v2/queues/samplequeue/messages?ids=575f6f2515e5c87d779a9b20,575f6f2515e5c87d779a9b21
Connection: close

{"resources": ["/v2/queues/samplequeue/messages/575f6f2515e5c87d779a9b20", "/v2/queues/samplequeue/messages/575f6f2515e5c87d779a9b21"]}