The apikeys and secret for each component has to be generated for each component and distributed to each component (during the startup). An additional apikey and secret must be created as manager api key. This manager api key will be the owner of all the topics that we will create and only the owner of a topic has rights to add a producer/consumer for that topic.

The apikeys of SDNR and policy must also be shared with PCI microservice so that it can do the registration of SDNR and policy to the relevant topics.

During the startup of the microservice, PCI microservice will do the following actions
           1. Fetch initial config from the policy
           2. Create the dmaap topics using the manager apikey and secret
           3. Register PCIMS as consumer to PCI-NOTIF topic
           4. Regsiter SDNR as producer to PCI-NOTIF topic
           5. Register PCIMS as producer for DCAE_CL_OUTPUT 
           6. Register Policy as consumer for DCAE_CL_OUTPUT
           7. Continously polls PCI-NOTIF-TOPIC for any new message from dmaap

The api documentation for managing the dmaap topics

https://wiki.onap.org/display/DW/DMaaP+API?preview=/11928249/11928248/MessageRouter-APIs.pdf

The following scripts can be used for publishing and consuming the messages.



get_message.shpost_message.sh


Usage: 


For publishing the message,

./postmessage.sh <topic> <apikey> <secret> <message_filepath>

For consuming the message,

./get_message.sh <topic> <apikey> <secret>


Note: The apiKey must be registered as a producer/consumer to the topic before publishing/consuming the message. 

Note: These scrtipts can also be modified for using other apis in dmaap.

  • No labels