2.05.2.05 - 2.05 - Multiple Messages - Teradata Listener

Teradata® Listener™ User Guide

prodname
Teradata Listener
vrm_release
2.05
category
User Guide
featnum
B035-2910-039K

This endpoint is designed to accept multiple messages, split them into individual messages, and pass them through Listener. Outside of splitting the messages, no transformation occurs. Call this endpoint to send multiple messages at once, rather than sending individual messages.

If the request payload is a JSON array, the payload is parsed and Listener treats each entity of the array as an individual message. If the payload is not a JSON array, then a non-zero length Delimiter must be sent to indicate which characters to use to split the payload into multiple messages. When sending a JSON object, each key is not treated as an individual message. You must send either a JSON array or delimited messages.

Definition

POST https://CLUSTER.DOMAIN/listener/ingestservices/message HTTP/1.1
Authorization: token SOURCE_SECRET_KEY
Content-Type: application/json
Delimiter: |
Sync: 1
Header Required Sample Value Purpose
Authorization Required fhwb-afwfa-wefaf Source secret key determines to which source the data is sent.
Delimiter Optional , Instructs Ingest to split the request body into multiple messages by a delimiter character. Can be any character except these: \/"''. Ignored if Content-Type is JSON.
Content-Type Optional application/json Content type of the request body. If application/json, Ingest parses the array into multiple messages.
Sync Optional 1 Request a UUID from Ingest to make sure Kafka accepted the message. Value must be 1 or it is treated as async.

Example Request

curl \
  -H "Content-Type: application/json" \
  -H "Authorization: token 0f6fd50e-9515-4730-92c0-2360b5af56d3" \
  -H "Sync: 1" \
  -H "Delimiter: ," \
  -X POST -d 'one,two,three' \
  -i \
  https://CLUSTER.DOMAIN/listener/ingestservices/message HTTP 1.1

Example Response

HTTP/1.1 201 Created
Content-Type: application/json
X-Total: 3
[
  {"uuid":"15183920e250242ac11000000"},
  {"uuid":"15183920e250242ac11000001"},
  {"uuid":"15183920e250242ac11000002"}
]

Response Codes

Code Description
201 Message successfully received.
400 Invalid or no Delimiter given (for non-JSON array payload).
401 Authorization header not found.
500 Message body could not be read or Kafka could not be reached.
502 Bad Gateway.
503 Service unavailable.
504 Gateway timeout.
See the system administrator for frequent responses of 502, 503, or 504. You may need to scale up ingest services or check to see if ingest services are up and running.