Ralph Knag | 1fca6ac | 2017-12-05 12:05:57 -0500 | [diff] [blame^] | 1 | .. This work is licensed under a Creative Commons Attribution 4.0 International License.
|
| 2 | .. http://creativecommons.org/licenses/by/4.0
|
| 3 |
|
| 4 | DMaaP connection objects
|
| 5 | ========================
|
| 6 |
|
| 7 | DMaaP connection objects are JSON objects that:
|
| 8 |
|
| 9 | 1. Components should expect at runtime in their application
|
| 10 | configuration and is to be used to connect to the appropriate DMaaP
|
| 11 | feed or topic.
|
| 12 | 2. Developers must provide through the command-line argument
|
| 13 | ``--dmaap-file`` to test their component with manually provisioned
|
| 14 | feeds and topics.
|
| 15 |
|
| 16 | This page is a reference to the specific structure that each type of
|
| 17 | DMaaP stream requires.
|
| 18 |
|
| 19 | Note for #1 that components should expect the entire object with all
|
| 20 | properties at runtime where the default will be ``null`` unless
|
| 21 | specified otherwise.
|
| 22 |
|
| 23 | Note for #2 that developers are not required to provide the entire
|
| 24 | object. The required properties will be labeled with “*required as
|
| 25 | input*”.
|
| 26 |
|
| 27 | .. _dmaap-message-router:
|
| 28 |
|
| 29 | Message router
|
| 30 | --------------
|
| 31 |
|
| 32 | Publishers and subscribers both have the same JSON object structure.
|
| 33 | Here’s an example:
|
| 34 |
|
| 35 | .. code:: json
|
| 36 |
|
| 37 | {
|
| 38 | "type": "message_router",
|
| 39 | "aaf_username": "some-user",
|
| 40 | "aaf_password": "some-password",
|
| 41 | "dmaap_info": {
|
| 42 | "client_role": "com.dcae.member",
|
| 43 | "client_id": "1500462518108",
|
| 44 | "location": "mtc00",
|
| 45 | "topic_url": "https://we-are-message-router.us:3905/events/some-topic"
|
| 46 | }
|
| 47 | }
|
| 48 |
|
| 49 |
|
| 50 | At the top-level:
|
| 51 |
|
| 52 | +-------------+----+--------------------+
|
| 53 | | Property | Ty\| Descript\ |
|
| 54 | | Name | pe | ion |
|
| 55 | +=============+====+====================+
|
| 56 | | type | st\| *Require\ |
|
| 57 | | | ri\| d \ |
|
| 58 | | | ng | as \ |
|
| 59 | | | | input*. |
|
| 60 | | | | Must be |
|
| 61 | | | | ``message_router`` |
|
| 62 | | | | for |
|
| 63 | | | | message |
|
| 64 | | | | router |
|
| 65 | | | | topics |
|
| 66 | +-------------+----+--------------------+
|
| 67 | | aaf_usernam\| st\| AAF |
|
| 68 | | e | ri\| username |
|
| 69 | | | ng | message |
|
| 70 | | | | router |
|
| 71 | | | | clients |
|
| 72 | | | | use to |
|
| 73 | | | | authenti\ |
|
| 74 | | | | cate |
|
| 75 | | | | with |
|
| 76 | | | | secure |
|
| 77 | | | | topics |
|
| 78 | +-------------+----+--------------------+
|
| 79 | | aaf_passwor\| st\| AAF |
|
| 80 | | d | ri\| password |
|
| 81 | | | ng | message |
|
| 82 | | | | router |
|
| 83 | | | | clients |
|
| 84 | | | | use to |
|
| 85 | | | | authenti\ |
|
| 86 | | | | cate |
|
| 87 | | | | with |
|
| 88 | | | | secure |
|
| 89 | | | | topics |
|
| 90 | +-------------+----+--------------------+
|
| 91 | | dmaap_info | JS\| *Require\ |
|
| 92 | | | ON | d \ |
|
| 93 | | | ob\| as \ |
|
| 94 | | | je\| input*. |
|
| 95 | | | ct | Contains |
|
| 96 | | | | the |
|
| 97 | | | | topic |
|
| 98 | | | | connecti\ |
|
| 99 | | | | on |
|
| 100 | | | | details |
|
| 101 | +-------------+----+--------------------+
|
| 102 |
|
| 103 | The ``dmaap_info`` object contains:
|
| 104 |
|
| 105 | +-------------+----+----------+
|
| 106 | | Property | Ty\| Descript\|
|
| 107 | | Name | pe | ion |
|
| 108 | +=============+====+==========+
|
| 109 | | client_role | st\| AAF |
|
| 110 | | | ri\| client |
|
| 111 | | | ng | role |
|
| 112 | | | | that’s |
|
| 113 | | | | requesti\|
|
| 114 | | | | ng |
|
| 115 | | | | publish |
|
| 116 | | | | or |
|
| 117 | | | | subscrib\|
|
| 118 | | | | e |
|
| 119 | | | | access |
|
| 120 | | | | to the |
|
| 121 | | | | topic |
|
| 122 | +-------------+----+----------+
|
| 123 | | client_id | st\| Client |
|
| 124 | | | ri\| id for |
|
| 125 | | | ng | given |
|
| 126 | | | | AAF |
|
| 127 | | | | client |
|
| 128 | +-------------+----+----------+
|
| 129 | | location | st\| DCAE |
|
| 130 | | | ri\| location |
|
| 131 | | | ng | for the |
|
| 132 | | | | publishe\|
|
| 133 | | | | r |
|
| 134 | | | | or |
|
| 135 | | | | subscrib\|
|
| 136 | | | | er, |
|
| 137 | | | | used to |
|
| 138 | | | | set up |
|
| 139 | | | | routing |
|
| 140 | +-------------+----+----------+
|
| 141 | | topic_url | st\| *Require\|
|
| 142 | | | ri\| d \ |
|
| 143 | | | ng | as \ |
|
| 144 | | | | input*. |
|
| 145 | | | | URL for |
|
| 146 | | | | accessin\|
|
| 147 | | | | g |
|
| 148 | | | | the |
|
| 149 | | | | topic to |
|
| 150 | | | | publish |
|
| 151 | | | | or |
|
| 152 | | | | receive |
|
| 153 | | | | events |
|
| 154 | +-------------+----+----------+
|
| 155 |
|
| 156 | Here’s an example of the minimal JSON that must be provided as an input:
|
| 157 |
|
| 158 | .. code:: json
|
| 159 |
|
| 160 | {
|
| 161 | "type": "message_router",
|
| 162 | "dmaap_info": {
|
| 163 | "topic_url": "https://we-are-message-router.us:3905/events/some-topic"
|
| 164 | }
|
| 165 | }
|
| 166 |
|
| 167 | .. _dmaap-data-router:
|
| 168 |
|
| 169 | Data router
|
| 170 | -----------
|
| 171 |
|
| 172 | Publisher
|
| 173 | ~~~~~~~~~
|
| 174 |
|
| 175 | Here’s an example of what the JSON object connection for data router
|
| 176 | publisher looks like:
|
| 177 |
|
| 178 | .. code:: json
|
| 179 |
|
| 180 | {
|
| 181 | "type": "data_router",
|
| 182 | "dmaap_info": {
|
| 183 | "location": "mtc00",
|
| 184 | "publish_url": "https://we-are-data-router.us/feed/xyz",
|
| 185 | "log_url": "https://we-are-data-router.us/feed/xyz/logs",
|
| 186 | "username": "some-user",
|
| 187 | "password": "some-password",
|
| 188 | "publisher_id": "123456"
|
| 189 | }
|
| 190 | }
|
| 191 |
|
| 192 | At the top-level:
|
| 193 |
|
| 194 | +-------------+----+----------------+
|
| 195 | | Property | Ty\| Descript\ |
|
| 196 | | Name | pe | ion |
|
| 197 | +=============+====+================+
|
| 198 | | type | st\| *Require\ |
|
| 199 | | | ri\| d \ |
|
| 200 | | | ng | as \ |
|
| 201 | | | | input*. |
|
| 202 | | | | Must be |
|
| 203 | | | | ``data_router``|
|
| 204 | | | | for data |
|
| 205 | | | | router |
|
| 206 | | | | feeds |
|
| 207 | +-------------+----+----------------+
|
| 208 | | dmaap_info | JS\| *Require\ |
|
| 209 | | | ON | d \ |
|
| 210 | | | ob\| as \ |
|
| 211 | | | je\| input*. |
|
| 212 | | | ct | Contains |
|
| 213 | | | | the |
|
| 214 | | | | topic |
|
| 215 | | | | connecti\ |
|
| 216 | | | | on |
|
| 217 | | | | details |
|
| 218 | +-------------+----+----------------+
|
| 219 |
|
| 220 | The ``dmaap_info`` object contains:
|
| 221 |
|
| 222 | +-------------+----+----------+
|
| 223 | | Property | Ty\| Descript\|
|
| 224 | | Name | pe | ion |
|
| 225 | +=============+====+==========+
|
| 226 | | location | st\| DCAE |
|
| 227 | | | ri\| location |
|
| 228 | | | ng | for the |
|
| 229 | | | | publishe\|
|
| 230 | | | | r, |
|
| 231 | | | | used to |
|
| 232 | | | | set up |
|
| 233 | | | | routing |
|
| 234 | +-------------+----+----------+
|
| 235 | | publish_url | st\| *Require\|
|
| 236 | | | ri\| d \ |
|
| 237 | | | ng | as \ |
|
| 238 | | | | input*. |
|
| 239 | | | | URL to |
|
| 240 | | | | which |
|
| 241 | | | | the |
|
| 242 | | | | publishe\|
|
| 243 | | | | r |
|
| 244 | | | | makes |
|
| 245 | | | | Data |
|
| 246 | | | | Router |
|
| 247 | | | | publish |
|
| 248 | | | | requests |
|
| 249 | +-------------+----+----------+
|
| 250 | | log_url | st\| URL from |
|
| 251 | | | ri\| which |
|
| 252 | | | ng | log data |
|
| 253 | | | | for the |
|
| 254 | | | | feed can |
|
| 255 | | | | be |
|
| 256 | | | | obtained |
|
| 257 | +-------------+----+----------+
|
| 258 | | username | st\| Username |
|
| 259 | | | ri\| the |
|
| 260 | | | ng | publishe\|
|
| 261 | | | | r |
|
| 262 | | | | uses to |
|
| 263 | | | | authenti\|
|
| 264 | | | | cate |
|
| 265 | | | | to Data |
|
| 266 | | | | Router |
|
| 267 | +-------------+----+----------+
|
| 268 | | password | st\| Password |
|
| 269 | | | ri\| the |
|
| 270 | | | ng | publishe\|
|
| 271 | | | | r |
|
| 272 | | | | uses to |
|
| 273 | | | | authenti\|
|
| 274 | | | | cate |
|
| 275 | | | | to Data |
|
| 276 | | | | Router |
|
| 277 | +-------------+----+----------+
|
| 278 | | publisher_i | st\| Publishe\|
|
| 279 | | d | ri\| r |
|
| 280 | | | ng | id in |
|
| 281 | | | | Data |
|
| 282 | | | | Router |
|
| 283 | +-------------+----+----------+
|
| 284 |
|
| 285 | Here’s an example of the minimal JSON that must be provided as an input:
|
| 286 |
|
| 287 | .. code:: json
|
| 288 |
|
| 289 | {
|
| 290 | "type": "data_router",
|
| 291 | "dmaap_info": {
|
| 292 | "publish_url": "https://we-are-data-router.us/feed/xyz"
|
| 293 | }
|
| 294 | }
|
| 295 |
|
| 296 | Subscriber
|
| 297 | ~~~~~~~~~~
|
| 298 |
|
| 299 | Here’s an example of what the JSON object connection for data router
|
| 300 | subscriber looks like:
|
| 301 |
|
| 302 | .. code:: json
|
| 303 |
|
| 304 | {
|
| 305 | "type": "data_router",
|
| 306 | "dmaap_info": {
|
| 307 | "location": "mtc00",
|
| 308 | "delivery_url": "https://my-subscriber-app.dcae:8080/target-path",
|
| 309 | "username": "some-user",
|
| 310 | "password": "some-password",
|
| 311 | "subscriber_id": "789012"
|
| 312 | }
|
| 313 | }
|
| 314 |
|
| 315 | At the top-level:
|
| 316 |
|
| 317 | +-------------+----+----------------+
|
| 318 | | Property | Ty\| Descript\ |
|
| 319 | | Name | pe | ion |
|
| 320 | +=============+====+================+
|
| 321 | | type | st\| *Require\ |
|
| 322 | | | ri\| d |
|
| 323 | | | ng | as \ |
|
| 324 | | | | input*. |
|
| 325 | | | | Must be |
|
| 326 | | | | ``data_router``|
|
| 327 | | | | for data |
|
| 328 | | | | router |
|
| 329 | | | | feeds |
|
| 330 | +-------------+----+----------------+
|
| 331 | | dmaap_info | JS\| *Require\ |
|
| 332 | | | ON | d \ |
|
| 333 | | | ob\| as \ |
|
| 334 | | | je\| input*. |
|
| 335 | | | ct | Contains |
|
| 336 | | | | the |
|
| 337 | | | | topic |
|
| 338 | | | | connecti\ |
|
| 339 | | | | on |
|
| 340 | | | | details |
|
| 341 | +-------------+----+----------------+
|
| 342 |
|
| 343 | The ``dmaap_info`` object contains:
|
| 344 |
|
| 345 | +--------------+----+----------+
|
| 346 | | Property | Ty\| Descript\|
|
| 347 | | Name | pe | ion |
|
| 348 | +==============+====+==========+
|
| 349 | | location | st\| DCAE |
|
| 350 | | | ri\| location |
|
| 351 | | | ng | for the |
|
| 352 | | | | publishe\|
|
| 353 | | | | r, |
|
| 354 | | | | used to |
|
| 355 | | | | set up |
|
| 356 | | | | routing |
|
| 357 | +--------------+----+----------+
|
| 358 | | delivery_ur\ | st\| URL to |
|
| 359 | | l | ri\| which |
|
| 360 | | | ng | the Data |
|
| 361 | | | | Router |
|
| 362 | | | | should |
|
| 363 | | | | deliver |
|
| 364 | | | | files |
|
| 365 | +--------------+----+----------+
|
| 366 | | username | st\| Username |
|
| 367 | | | ri\| Data |
|
| 368 | | | ng | Router |
|
| 369 | | | | uses to |
|
| 370 | | | | authenti\|
|
| 371 | | | | cate |
|
| 372 | | | | to the |
|
| 373 | | | | subscrib\|
|
| 374 | | | | er |
|
| 375 | | | | when |
|
| 376 | | | | deliveri\|
|
| 377 | | | | ng |
|
| 378 | | | | files |
|
| 379 | +--------------+----+----------+
|
| 380 | | password | st\| Password |
|
| 381 | | | ri\| Data |
|
| 382 | | | ng | Router |
|
| 383 | | | | uses to |
|
| 384 | | | | authenti\|
|
| 385 | | | | cate |
|
| 386 | | | | to the |
|
| 387 | | | | subscrib\|
|
| 388 | | | | er |
|
| 389 | | | | when |
|
| 390 | | | | deliveri\|
|
| 391 | | | | ng |
|
| 392 | | | | files |
|
| 393 | +--------------+----+----------+
|
| 394 | | subscriber_i\| st | Subscrib\|
|
| 395 | | d | ri | er |
|
| 396 | | | ng | id in |
|
| 397 | | | | Data |
|
| 398 | | | | Router |
|
| 399 | +--------------+----+----------+
|
| 400 |
|
| 401 | Here’s an example of the minimal JSON that must be provided as an input:
|
| 402 |
|
| 403 | .. code:: json
|
| 404 |
|
| 405 | {
|
| 406 | "type": "data_router",
|
| 407 | "dmaap_info": {
|
| 408 | }
|
| 409 | }
|
| 410 |
|
| 411 | Developers are recommended to use ``username`` and ``password`` since
|
| 412 | this is the recommended security practice.
|
| 413 |
|
| 414 | Note that the dcae-cli will construct the ``delivery_url`` when
|
| 415 | deploying the component since this can only be known at deployment time.
|