16. Tap DSL
Prev | Part III. Streams | Next

## 16. Tap DSL

Taps can be created at various producer endpoints in a stream. For a stream like this:

    stream create --definition "http | step1: transform --expression=payload.toUpperCase() | step2: transform --expression=payload+'!' | log" --name mainstream --deploy

taps can be created at the output of `http`, `step1` and `step2`.

To create a stream that acts as a 'tap' on another stream requires to specify the `source destination name` for the tap stream. The syntax for source destination name is:

    `<stream-name>.<label/app-name>`

To create a tap at the output of `http` in the stream above, the source destination name is `mainstream.http` To create a tap at the output of the first transform app in the stream above, the source destination name is `mainstream.step1`

The tap stream DSL looks like this:

    stream create --definition ":mainstream.http > counter" --name tap_at_http --deploy

    stream create --definition ":mainstream.step1 > jdbc" --name tap_at_step1_transformer --deploy

Note the colon (:) prefix before the destination names. The colon lets the parser parse this as the destination name instead of app name.

Prev | Up | Next
15. Module Labels | Home | 17. Connecting to explicit destination names at the broker