From eb4cf54acb2a7ed9d3052c3bf73aebe48aeafd4b Mon Sep 17 00:00:00 2001 From: tkogut Date: Fri, 12 Mar 2021 11:07:53 +0100 Subject: Update documentation regarding authorized topics configuration in dmaap-client. Issue-ID: DCAEGEN2-2670 Signed-off-by: tkogut Change-Id: I772af8e7e95fcf15252dd7bd7b1fd777573e5a30 --- docs/sections/sdk/apis.rst | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) (limited to 'docs/sections/sdk') diff --git a/docs/sections/sdk/apis.rst b/docs/sections/sdk/apis.rst index 8f20a0ab..823027f2 100644 --- a/docs/sections/sdk/apis.rst +++ b/docs/sections/sdk/apis.rst @@ -291,6 +291,54 @@ The default custom persistent connection configuration (connectionPool=16, maxLi ImmutableDmaapConnectionPoolConfig.builder().build() +*************************************** +Configure request for authorized topics +*************************************** + +* publisher: + +.. code-block:: java + + final MessageRouterSink sink = ImmutableMessageRouterSink.builder() + .aafCredentials(ImmutableAafCredentials.builder() + .username("username") + .password("password").build()) + . + . + . + .build(); + + final MessageRouterPublishRequest request = ImmutableMessageRouterPublishRequest.builder() + .sinkDefinition(sink) + . + . + . + .build(); + +* subscriber: + +.. code-block:: java + + final MessageRouterSource sourceDefinition = ImmutableMessageRouterSource.builder() + .aafCredentials(ImmutableAafCredentials.builder() + .username("username") + .password("password") + .build()) + . + . + . + .build(); + + final MessageRouterSubscribeRequest request = ImmutableMessageRouterSubscribeRequest.builder() + .sourceDefinition(sourceDefinition) + . + . + . + .build(); + +AAF Credentials are optional for subscribe/publish requests. +Username and password are used for basic authentication header during sending HTTP request to dmaap-mr. + hvvesclient-producer - a reference Java implementation of High Volume VES Collector client ------------------------------------------------------------------------------------------ This library is used in xNF simulator which helps us test HV VES Collector in CSIT tests. You may use it as a reference when implementing your code in non-JVM language or directly when using Java/Kotlin/etc. -- cgit 1.2.3-korg