commit | a190d0e9b0ed2ed0b2179f06879c2331bfbe2f59 | [log] [tgz] |
---|---|---|
author | Jessica Wagantall <jwagantall@linuxfoundation.org> | Fri Apr 12 15:55:50 2024 -0700 |
committer | Matthew Watkins <mwatkins@linuxfoundation.org> | Tue Apr 23 10:22:22 2024 +0100 |
tree | a02d15ec00efe2578d27afb0e2db2e3c6432097a | |
parent | 0ce7926cadf6f0e3049ce3542bbfa38387cf1ac2 [diff] |
CI: Add SonarCloud scan GHA workflow Change-Id: I12881846390bc84ebf72abfc1c344c3307e82fbc Signed-off-by: Jessica Wagantall <jwagantall@linuxfoundation.org>
This product is a generic information producer (as defined by the Information Coordinator Service (ICS)). It can produce any information that can be retrieved from DMaaP or Kafka. Its main tasks is to register information types and itself as a producer using the ICS Data Producer API.
A data consumer may create information jobs through the ICS Data Producer API.
This service will retrieve data from the DMaaP Message Router (MR) or from the Kafka streaming platform and will distribute it further to the data consumers (information job owners).
The component is a springboot service and is configured as any springboot service through the file config/application.yaml
. The component log can be retrieved and logging can be controled by means of REST call. See the API documentation (api/api.yaml).
The file config/application_configuration.json
contains the configuration of job types that the producer will support. Here follows an example with one type:
{ "types": [ { "id": "ExampleInformationType1_1.0.0", "dmaapTopicUrl": "events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/STD-Fault-Messages_1.0.0", "useHttpProxy": true }, { "id": "ExampleInformationType2_2.0.0", "kafkaInputTopic": "KafkaInputTopic", "useHttpProxy": false } ] }
Each information type has the following properties:
The service producer will poll MR and/or listen to Kafka topics for all configured job types. When receiving messages for a type, it will distribute these messages to all jobs registered for the type. If a consumer is unavailable for distribution, the messages will be discarded for that consumer.
When an Information Job is created in the Information Coordinator Service Consumer API, it is possible to define a number of job specific properties. For an Information type that has a Kafka topic defined, the following Json schema defines the properties that can be used:
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "filter": { "type": "string" }, "maxConcurrency": { "type": "integer" }, "bufferTimeout": { "type": "object", "properties": { "maxSize": { "type": "integer" }, "maxTimeMilliseconds": { "type": "integer" } }, "additionalProperties": false, "required": [ "maxSize", "maxTimeMilliseconds" ] } }, "additionalProperties": false }
-filter is a regular expression. Only strings that matches the expression will be pushed further to the consumer. -maxConcurrency the maximum number of concurrent REST session for the data delivery to the consumer. The default is 1 and that is the number that must be used to guarantee that the object sequence is maintained. A higher number will give higher throughtput. -bufferTimeout, can be used to reduce the number of REST calls to the consumer. If defined, a number of objects will be buffered and sent in one REST call to the consumer. The buffered objects will be put in a Json array and quoted. Example; Object1 and Object2 may be posted in one call --> ["Object1", "Object2"] The bufferTimeout is a Json object and the parameters in the object are:
For an information type that only has a DMaaP topic, the following Json schema defines the possible parameters to use when creating an information job:
{ "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", "properties": { "filter": { "type": "string" } }, "additionalProperties": false }
-filter is a regular expression. Only strings that matches the expression will be pushed furter to the consumer. This has a similar meaning as in jobs that receives data from Kafka.
Copyright (C) 2021 Nordix Foundation. Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. For more information about license please see the LICENSE file for details.