Merge "Onboarding documentation update for CLI"
[dcaegen2.git] / platformdoc / docs / components / component-specification / dmaap-connection-objects.md
@@ -1,19 +1,14 @@
 # DMaaP connection objects
 
-DMaaP connection objects are JSON objects that:
+DMaaP Connection Objects are JSON objects that:
 
-1. Components should expect at runtime in their application configuration and is to be used to connect to the appropriate DMaaP feed or topic.
-2. Developers must provide through the command-line argument `--dmaap-file` to test their component with manually provisioned feeds and topics.
+1. At Runtime - this is generated by the DCAE Platform and passed to the component in its application_configuration to be used to connect to the DMaaP feed or topic. Components will receive the entire object with all properties populated (default will be `null) unless specified otherwise.
+2. During dcae_cli testing - this is provided through the command-line argument `--dmaap-file` to test the component with manually provisioned feeds and topics. Developers are not required to provide the entire object.  The required properties are labeled below with "*Required as input*".
 
-This page is a reference to the specific structure that each type of DMaaP stream requires.
+## Message Router
 
-Note for #1 that components should expect the entire object with all properties at runtime where the default will be `null` unless specified otherwise.
-
-Note for #2 that developers are not required to provide the entire object.  The required properties will be labeled with "*required as input*".
-
-## Message router
-
-Publishers and subscribers both have the same JSON object structure.  Here's an example:
+Publishers and subscribers have the same generated `Dmaap Connection Object` structure.  Here's an example for any given config-key:
+(This is what will be in application_configuration)
 
 ```json
 {
@@ -47,7 +42,7 @@ client_id | string | Client id for given AAF client
 location | string | DCAE location for the publisher or subscriber, used to set up routing
 topic_url | string | *Required as input*. URL for accessing the topic to publish or receive events
 
-Here's an example of the minimal JSON that must be provided as an input:
+The --dmaap-file argument (to the component `run` or `dev` command), must minimally contain:
 
 ```json
 {
@@ -58,11 +53,12 @@ Here's an example of the minimal JSON that must be provided as an input:
 }
 ```
 
-## Data router
+## Data Router
 
 ### Publisher
 
-Here's an example of what the JSON object connection for data router publisher looks like:
+Here's an example of what the generated `Dmaap Connection Object` for Data Router Publisher looks like:
+(This is what will be in application_configuration)
 
 ```json
 {
@@ -83,7 +79,7 @@ At the top-level:
 Property Name | Type | Description
 ------------- | ---- | -----------
 type | string | *Required as input*.  Must be `data_router` for data router feeds
-dmaap_info | JSON object | *Required as input*. Contains the topic connection details
+dmaap_info | JSON object | *Required as input*. Contains the feed connection details
 
 The `dmaap_info` object contains:
 
@@ -96,7 +92,7 @@ username | string | Username the publisher uses to authenticate to Data Router
 password | string | Password the publisher uses to authenticate to Data Router
 publisher_id | string | Publisher id in Data Router
 
-Here's an example of the minimal JSON that must be provided as an input:
+The --dmaap-file argument (to the component `run` or `dev` command), must minimally contain:
 
 ```json
 {
@@ -109,7 +105,8 @@ Here's an example of the minimal JSON that must be provided as an input:
 
 ### Subscriber
 
-Here's an example of what the JSON object connection for data router subscriber looks like:
+Here's an example of what the generated `Dmaap Connection Object` for a Data Router Subscriber looks like:
+(This is what will be passed in application_configuration)
 
 ```json
 {
@@ -129,19 +126,19 @@ At the top-level:
 Property Name | Type | Description
 ------------- | ---- | -----------
 type | string | *Required as input*.  Must be `data_router` for data router feeds
-dmaap_info | JSON object | *Required as input*. Contains the topic connection details
+dmaap_info | JSON object | *Required as input*. Contains the feed connection details
 
 The `dmaap_info` object contains:
 
 Property Name | Type | Description
 ------------- | ---- | -----------
-location | string | DCAE location for the publisher, used to set up routing
+location | string | DCAE location for the subscriber, used to set up routing
 delivery_url | string | URL to which the Data Router should deliver files
 username | string | Username Data Router uses to authenticate to the subscriber when delivering files
 password | string | Password Data Router uses to authenticate to the subscriber when delivering files
 subscriber_id | string | Subscriber id in Data Router
 
-Here's an example of the minimal JSON that must be provided as an input:
+The --dmaap-file argument (to the component `run` or `dev` command), must minimally contain:
 
 ```json
 {
@@ -151,6 +148,22 @@ Here's an example of the minimal JSON that must be provided as an input:
 }
 ```
 
-Developers are recommended to use `username` and `password` since this is the recommended security practice.
+It is the recommended security practice that `username` and `password` are specified.
+You cannot provide the `delivery_url` in your dmaap-file, because it's not constructed until deployment time. Therefore, after the test deployment, go back to the Data Router Feed and provide the delivery_url (in order to start receiving the feeds). 
+
+### Data Router Example
+
+(After the Data Router feed has been manually provisioned)
+
+```
+$ dcae_cli component run --dmaap-file $dmaap_file $component-name
+DCAE.Run | WARNING | Your component is a data router subscriber. Here are the delivery urls:
+
+        some-sub-dr: http://135.205.226.128:32838/identity
+```
+
+(Update the Data Router Feed to provide the delivery_url).
+
+
+
 
-Note that the dcae-cli will construct the `delivery_url` when deploying the component since this can only be known at deployment time.