The OPC Publisher Microservice provides APIs to configure the OPC UA PubSub configuration surface of the OPC Publisher module. It configures the OPC Publisher and manages job that an OPC Publisher module can receive to publish data.
The Jobs-API provides functionality to List, Query, Get, Cancel, Restart and Delete jobs. The creation of jobs in handled automatically by using the Publish-API.
The Publish-API provides functionality to start the publishing of values of an endpoint. This endpoint also handles the creation of new jobs. There is also the possibility to bulk publish nodes (i.e. to publish multiple nodes at once).
The Worker REST API can be used to Get/List the active workers and to remove a worker from the list.
Configuration Parameter | Modality | Default Value | Description |
---|---|---|---|
CORS Configuration | |||
Cors:Whitelist PCS_CORS_WHITELIST |
optional | (empty) | When a CORS Whitelist is set, CORS will be enabled. Otherwise, CORS will be disabled. |
Service Authentication Configuration | |||
Auth:Required PCS_AUTH_REQUIRED |
optional | true |
Whether authentication should be added to APIs and OpenAPI UI. |
OpenApi Configuration | |||
OpenApi:Enabled PCS_OPENAPI_ENABLED |
optional | true if OpenApi:AppId is set,false otherwise |
Whether OpenApi should be enabled. |
OpenApi:UseV2 PCS_OPENAPI_USE_V2 PCS_SWAGGER_V2 |
optional | true |
Create v2 open api json. |
OpenApi:AppId PCS_OPENAPI_APPID PCS_AAD_CONFIDENTIAL_CLIENT_APPID |
optional | (empty) | The Application id for the OpenAPI UI client. |
OpenApi:AppSecret PCS_OPENAPI_APP_SECRET PCS_AAD_CONFIDENTIAL_CLIENT_SECRET |
optional | (empty) | Application Secret |
OpenApi:AuthorizationUrl |
optional | (empty) | Authorization URL |
OpenApi:ServerHost PCS_OPENAPI_SERVER_HOST |
optional | (empty) | Server host for OpenAPI. |
CosmosDb Configuration | |||
CosmosDb:ConnectionString PCS_COSMOSDB_CONNSTRING |
required | null |
CosmosDB Connection string. |
CosmosDb:ThroughputUnits PCS_COSMOSDB_THROUGHPUT |
optional | 400 |
Throughput units |
Forwarded Headers Configuration | |||
AspNetCore:ForwardedHeaders:Enabled ASPNETCORE_FORWARDEDHEADERS_ENABLED |
optional | false |
Determines whether processing of forwarded headers should be enabled or not. |
AspNetCore:ForwardedHeaders:ForwardLimit ASPNETCORE_FORWARDEDHEADERS_FORWARDLIMIT |
optional | 0 |
Determines limit on number of entries in the forwarded headers. |
Web Host Configuration | |||
Auth:HttpsRedirectPort PCS_AUTH_HTTPSREDIRECTPORT |
optional | 0 |
null value allows http. Should always be set to the https port except for local development. JWT tokens are not encrypted and if not sent over HTTPS will allow an attacker to get the same authorization. |
Host:ServicePathBase PCS_SERVICE_PATH_BASE PCS_PUBLISHER_SERVICE_PATH_BASE |
optional | (empty) | Determines URL path base that service should be running on. |
IoT Hub Configuration | |||
IoTHubConnectionString PCS_IOTHUB_CONNSTRING _HUB_CS |
required | null |
IoT hub connection string |
Container Registry Configuration | |||
Docker:Server PCS_DOCKER_SERVER |
optional | mcr.microsoft.com |
URL of the server |
Docker:User PCS_DOCKER_USER |
optional | null |
Username |
Docker:Password PCS_DOCKER_PASSWORD |
optional | null |
Password |
Docker:ImagesNamespace PCS_IMAGES_NAMESPACE |
optional | (empty) | The namespace of the images |
Docker:ImagesTag PCS_IMAGES_TAG |
optional | (current microservice version) | The tag of the images |
Registry Configuration | |||
OpcRegistryServiceUrl PCS_TWIN_REGISTRY_URL |
optional | http://localhost:9042/registry |
Opc registry service URL |
Twin Configuration | |||
OpcTwinServiceUrl PCS_TWIN_SERVICE_URL |
optional | http://localhost:9041/twin |
OPC twin service endpoint URL |
Publisher Configuration | |||
Publisher:DefaultBatchTriggerInterval PCS_DEFAULT_PUBLISH_JOB_BATCH_INTERVAL |
optional | 500 |
Default batch interval for OPC Publisher module. The value is in milliseconds. Allowed values are between 100 and 3600000 milliseconds. |
Publisher:DefaultBatchSize PCS_DEFAULT_PUBLISH_JOB_BATCH_SIZE |
optional | 50 |
Default batch size for OPC Publisher module. Allowed values are between 2 and 1000. |
Publisher:DefaultMaxEgressMessageQueue PCS_MAX_EGRESS_MESSAGE_QUEUE |
optional | 4096 |
Default size of buffer for egress messages of OPC Publisher module. Allowed values are between 2 and 25000. |
Publisher:DefaultMessagingMode PCS_DEFAULT_PUBLISH_MESSAGING_MODE |
optional | Samples |
Default messaging mode for jobs of OPC Publisher module. Allowed values: PubSub , Samples . |
Publisher:DefaultMessageEncoding PCS_DEFAULT_PUBLISH_MESSAGE_ENCODING |
optional | Json |
Default message encoding for jobs of OPC Publisher module. Allowed values: Json , Uadp . |
docker pull mcr.microsoft.com/iot/opc-publisher-service:latest
The OPC Publisher Job Orchestrator Microservice is responsible to manage distribution of Jobs across publishers. It is used to orchestrate and fail over publishing of nodes from one publisher module to another. It does not create/update jobs, for that, the OPC Publisher Microservice is used.
APIs of OPC Publisher Job Orchestrator Microservice are internal and are intended only for communication with OPC Publisher modules.
Configuration Parameter | Modality | Default Value | Description |
---|---|---|---|
CORS Configuration | |||
Cors:Whitelist PCS_CORS_WHITELIST |
optional | (empty) | When a CORS Whitelist is set, CORS will be enabled. Otherwise, CORS will be disabled. |
Service Authentication Configuration | |||
Auth:Required PCS_AUTH_REQUIRED |
optional | true |
Whether authentication should be added to APIs and OpenAPI UI. |
OpenApi Configuration | |||
OpenApi:Enabled PCS_OPENAPI_ENABLED |
optional | true if OpenApi:AppId is set,false otherwise |
Whether OpenApi should be enabled. |
OpenApi:UseV2 PCS_OPENAPI_USE_V2 PCS_SWAGGER_V2 |
optional | true |
Create v2 open api json. |
OpenApi:AppId PCS_OPENAPI_APPID PCS_AAD_CONFIDENTIAL_CLIENT_APPID |
optional | (empty) | The Application id for the OpenAPI UI client. |
OpenApi:AppSecret PCS_OPENAPI_APP_SECRET PCS_AAD_CONFIDENTIAL_CLIENT_SECRET |
optional | (empty) | Application Secret |
OpenApi:AuthorizationUrl |
optional | (empty) | Authorization URL |
OpenApi:ServerHost PCS_OPENAPI_SERVER_HOST |
optional | (empty) | Server host for OpenAPI. |
CosmosDb Configuration | |||
CosmosDb:ConnectionString PCS_COSMOSDB_CONNSTRING |
required | null |
CosmosDB Connection string. |
CosmosDb:ThroughputUnits PCS_COSMOSDB_THROUGHPUT |
optional | 400 |
Throughput units |
Forwarded Headers Configuration | |||
AspNetCore:ForwardedHeaders:Enabled ASPNETCORE_FORWARDEDHEADERS_ENABLED |
optional | false |
Determines whether processing of forwarded headers should be enabled or not. |
AspNetCore:ForwardedHeaders:ForwardLimit ASPNETCORE_FORWARDEDHEADERS_FORWARDLIMIT |
optional | 0 |
Determines limit on number of entries in the forwarded headers. |
Web Host Configuration | |||
Auth:HttpsRedirectPort PCS_AUTH_HTTPSREDIRECTPORT |
optional | 0 |
null value allows http. Should always be set to the https port except for local development. JWT tokens are not encrypted and if not sent over HTTPS will allow an attacker to get the same authorization. |
Host:ServicePathBase PCS_SERVICE_PATH_BASE PCS_PUBLISHER_ORCHESTRATOR_SERVICE_PATH_BASE |
optional | (empty) | Determines URL path base that service should be running on. |
IoT Hub Configuration | |||
IoTHubConnectionString PCS_IOTHUB_CONNSTRING _HUB_CS |
required | null |
IoT hub connection string |
Job Orchestrator Configuration | |||
JobStaleTime |
optional | "00:15:00" |
The duration after that a job is marked as stale (after the last heartbeat of an agent has been received) |
docker pull mcr.microsoft.com/iot/opc-publisher-edge-service:latest