Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...


5. ICS flow:
a) Create a type (PUT /info-types)
b) Create a producer (PUT /info-producers) {supports type for filtering}
c) Create a job (PUT /info-jobs) {consumer subscription}

a) ICS type: Stores the data schema of what's sent between the producer and consumer.

PUT {{baseUrl}}/data-producer/v1/info-types/{{infoTypeId}}

{
    "info_job_data_schema": {
        "topicName": "example_topic",
        "key": "example_key",
        "message": "example_message"
    },
    "info_type_information": {}
}

b) Onboarding a producer in ICS:

PUT {{baseUrl}}/data-producer/v1/info-producers/{{infoProducerId}}

{
  "supported_info_types": ["example_info_type_id"],
  "info_job_callback_url": "http://example.com/job_callback", //POST JobCallbackUrl() + "/" + infoJob.getId();
  "info_producer_supervision_callback_url": "http://example.com/producer_supervision_callback"
}

"jobCallbackUrl" and "producerSupervisionCallbackUrl" are used for communication between a service and external producers in the context of the Information Control Service (ICS).

  • jobCallbackUrl: This URL serves as a callback endpoint for the producer. When the service needs to communicate or interact with the producer regarding a specific job, it sends requests to this URL. In the stopInfoJob() method, the service constructs a URL by appending the job ID to the jobCallbackUrl of the producer. Then it sends a DELETE request to this URL, effectively stopping the job. In the startInfoJob() method, the service sends a POST request to the jobCallbackUrl to start a job in the producer.

  • producerSupervisionCallbackUrl: This URL is used for health checks or supervision purposes. The service can send requests to this URL to check the health or status of the producer. In the healthCheck() method, the service sends a GET request to the producerSupervisionCallbackUrl to check the health of the producer.

In summary, both URLs facilitate communication between the service and external producers, enabling actions like starting and stopping jobs, as well as monitoring the health and status of the producers.

c) Giving the consumer a job definition:

PUT {{baseUrl}}/data-consumer/v1/info-jobs/{{infoJobId}}

{
  "info_type_id": "example_info_type_id",
  "job_owner": "example_owner",
  "job_definition": {
    "example_key1": "example_value1",
    "example_key2": "example_value2"
  },
  "job_result_uri": "http://example.com/job_result",
  "status_notification_uri": "http://example.com/status_notification"
}

The URLs seem to be used only for validation (?)