File: verify.rst

package info (click to toggle)
zaqar 21.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,964 kB
  • sloc: python: 28,819; sh: 513; java: 135; makefile: 63; javascript: 50
file content (36 lines) | stat: -rw-r--r-- 1,321 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
.. _verify:

Verify operation
~~~~~~~~~~~~~~~~

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

.. code-block:: console

   $ 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:

.. code-block:: console

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