- 2.05 - Broadcast Streams - Teradata Listener

Teradata® Listener™ User Guide

Teradata Listener
User Guide

A broadcast stream creates a WebSocket server allowing the user to connect third-party apps or custom logic to a Listener source. A stream requires: name in source_id.

  "target_type": "websocket",
  "source_id": "84757abc-ba43-5736-0ba3-1bdac4748290",
    "name": "my websocket"

Elements are returned when a stream is created and provides you with the following client connection details:

  "target_id": "d8b30bfd-a67e-4cf6-a826-e772db4f8447",
  "source_id": "84757abc-ba43-5736-0ba3-1bdac4748290",
  "system_id": "",
  "owner": [
  "collaborators": null,
  "created_at": "2019-03-20T15:48:53Z",
  "created_by": "listener",
  "updated_at": "2019-03-20T15:48:53Z",
  "updated_by": "listener",
  "name": "my websocket",
  "description": "",
  "target_type": "websocket",
  "data_path": {
    "secret": "fa6aa22d-593f-40ba-924d-05f944813eb9",
    "url": "https://CLUSTER.DOMAIN/listener/streamer/d8b30bfd-a67e-4cf6-a826-e772db4f8447",
    "websocket": "wss://CLUSTER.DOMAIN/listener/streamer/d8b30bfd-a67e-4cf6-a826-e772db4f8447"
  "sample_size": 0,
  "system_info": null,
  "state": "1",
  "production": false,
  "bundle": false,
  "bundle_type": "",
  "bundle_interval": 0,
  "data_map": null,
  "properties": null,
  "use_dead_letter_queue": false,
  "dead_letter_queue": ""

To connect to a stream, send a WebSocket handshake request to the returned URL with the correct authorization header. The following is an example using HTTP header to pass secret key:

curl -k -i -N -H "Connection: Upgrade" -H "Authorization: secret {secret key}" -H 
"Upgrade: websocket" -H "Host: tst19001.uda.io/listener/v1/streamer" -H
"Origin: tst19001.uda.io/listener/v1/streamer" https://tst19001.uda.io/listener/v1/streamer/bdbfeb4a-7cf1-4da8-aba9-7594d56026d0

The following is an example using URI query parameter to pass secret key:

curl -i -N -H "Connection: Upgrade" -H "Upgrade: websocket" -H "Host: tst19001.uda.io/listener/v1/streamer" -H "Origin: tst19001.uda.io/listener/v1/streamer" https://tst19001.uda.io/listener/v1/streamer/bdbfeb4a-7cf1-4da8-aba9-7594d56026d0?secret={secret key}

The following is an example wss protocol:

wss://listener-streamer-services-myenv.example.com/v1/streamer/e5925443-ec1c-4fd4-ada8-8d8c6c603cee?secret={secret key}