Create READDME file for DMaaP Mediator Producer
[nonrtric.git] / dmaap-mediator-producer / README.md
1 # O-RAN-SC Non-RealTime RIC DMaaP Mediator Producer
2
3 This product is a producer of Information Coordinator Service (ICS) jobs for polling topics in DMaaP Message Router (MR) and pushing the messages to a consumer.
4
5 The producer takes a number of environment variables, described below, as configuration.
6
7 >- INFO_PRODUCER_HOST  **Required**. The host for the producer.                                   Example: `http://mrproducer`
8 >- LOG_LEVEL           Optional. The log level, which can be `Error`, `Warn`, `Info` or `Debug`.  Defaults to `Info`.
9 >- INFO_PRODUCER_PORT  Optional. The port for the product.                                        Defaults to `8085`.
10 >- INFO_COORD_ADDR     Optional. The address of the Information Coordinator.                      Defaults to `http://enrichmentservice:8083`.
11 >- MR_HOST             Optional. The host for the DMaaP Message Router.                           Defaults to `http://message-router.onap`.
12 >- MR_PORT             Optional. The port for the DMaaP Message Router.                           Defaults to `3904`.
13
14 The file `configs/type_config.json` contains the configuration of job types that the producer will support.
15
16     {
17        "types":
18         [
19           {
20             "id": The ID of the job type, e.g. "STD_Fault_Messages",
21             "dmaapTopicUrl": The topic URL to poll from DMaaP Message Router, e.g. "events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/STD_Fault_Messages"
22           }
23       ]
24     }
25
26 At start up the producer will register the configured job types in ICS and also register itself as a producer supporting these types.
27
28 Once the initial registration is done, the producer will constantly poll MR for all configured job types. When receiving messages for a type, it will distribute these messages to all jobs registered for the type. If no jobs for that type are registered, the messages will be discarded. If a consumer is unavailable for distribution, the messages will be discarded for that consumer.
29
30 ## License
31
32 Copyright (C) 2021 Nordix Foundation.
33 Licensed under the Apache License, Version 2.0 (the "License")
34 you may not use this file except in compliance with the License.
35 You may obtain a copy of the License at
36
37       http://www.apache.org/licenses/LICENSE-2.0
38
39 Unless required by applicable law or agreed to in writing, software
40 distributed under the License is distributed on an "AS IS" BASIS,
41 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
42 See the License for the specific language governing permissions and
43 limitations under the License.
44
45 For more information about license please see the [LICENSE](LICENSE.txt) file for details.