Overview
This operation will keep the listening stream open in the background. If a stream is opened on a directory, and that directory contains data, then the data will be loaded immediately when the stream is opened. Streams can be closed by using theSTOP_LISTEN operation. The status of an open stream
can be retrieved using the LIST_STATUS operation.
The START_LISTEN operation can act on any fetching Topic.
Request
- Java
- JSON
DlcStartListenRequest
| Key | Required | Type | Description |
|---|---|---|---|
| topics | Y | Set<String> | Set of topics or aliases. |
| topicOverrides | Set<ILoadingTopicDescription> | Topic overrides. | |
| scope | IDlcScope | Scope Parameters | |
| branch | String | The branch to operate on. | |
| performGcOnStart | Boolean | Perform a Garbage collection before the datastore transaction. | |
| performGcOnCompletion | Boolean | Perform a Garbage collection after the datastore transaction. | |
| sourceName | String | The source name to operate on. See source to topic matching. | |
| sourceType | DlcSourceType | The source type to operate on. See source to topic matching. |
Example:
Response
- Java
- JSON
DlcStartListenResponse
| Key | Type | Description |
|---|---|---|
| report | StartListenReport | Report of what occurred during the START_LISTEN operation. |
| status | DlcStatus | Status of the DLC Operation. |
StartListenReport
| Key | Type | Description |
|---|---|---|
| listenIdPerTopic | Map<String, String> | A unique identifier to the stream that was opened for each Topic. |
DlcStatus
A simple enum to capture if the DLC request was executed.| Key | Description |
|---|---|
| OK | Request was handled successfully. |
| ERROR | Request was not able to be performed correctly. |
How it works
File source types
For file source types, the DLC will register a file listener and start listening on the specified topics. When the file watcher is notified of file updates, the DLC listen operation will execute a DLCLOAD operation to load the files that have been updated.
This means that the listen operation will simply execute a LOAD operation on all file updates.