CRecordRemoveMicroServiceInstance

When a microservice instance is removed, this message notifies the microservice registry. The registry will then delete the reference to this instance as well.

This message belongs to the microservice registry API.

{
  "id": "faf04666-44a8-418f-91d6-3c78eb35cbfc",
  "name": "REMOVE_MICRO_SERVICE_INSTANCE",
  "description": "Remove a single microservice instance.",
  "isService": "false",
  "slots": [
    {
      "key": "1",
      "name": "MICRO_SERVICE_ID",
      "direction": "REQUEST",
      "mandatory": "true",
      "type": "ID",
      "description": "The ID of a the microservice."
    },
    {
      "key": "2",
      "name": "MICRO_SERVICE_INSTANCE_ID",
      "direction": "REQUEST",
      "mandatory": "true",
      "type": "ID",
      "description": "The ID of the microservice instance."
    }
  ]
}

Example of use (after generating of the class CRecordRemoveMicroServiceInstance):

private void sendRemoveMicroService(@NotNull final CTargetAddress aAddressOfMicroserviceRegistry,
                                    @NotNull final IId aMicroserviceId,
                                    @NotNull final IId aMicroserviceInstanceId) throws CException
{
    final CEnvelope env = CEnvelope.forSingleTarget(aAddressOfMicroserviceRegistry);
    final CRecord rec = CRecordRemoveMicroServiceInstance.create();
    CRecordRemoveMicroServiceInstance.setMicroServiceId(rec,
                                                        aMicroserviceId);
    CRecordRemoveMicroServiceInstance.setMicroServiceInstanceId(rec,
                                                                aMicroserviceInstanceId);
    sendRequest(env,
                rec);
}

nyssr.net - Innovative Distributed System