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"]}