Skip to content
Snippets Groups Projects
Commit 40062ec1 authored by Komal Makkar's avatar Komal Makkar
Browse files

Merge branch 'users/nikhil/updateDocs' into 'master'

Update GUIDELINES_FOR_USING_NOTIFICATION.md

See merge request !165
parents 24811cf9 2f58c4ff
No related branches found
No related tags found
1 merge request!165Update GUIDELINES_FOR_USING_NOTIFICATION.md
Pipeline #85417 failed
......@@ -35,17 +35,29 @@ az keyvault secret show --vault-name $KEY_VAULT_NAME --name $KEY_VAULT_SECRET_NA
| name | value | description | sensitive? | source |
| --- | --- | --- | --- | --- |
| `LOG_PREFIX` | `notification` | Logging prefix | no | - |
| `app.entitlements` | ex `https://foo-entitlements.azurewebsites.net` | Entitlements API endpoint | no | output of infrastructure deployment |
| `app.register`| ex `https://foo-register.azurewebsites.net`| Registration Service API endpoint | no | output of infrastructure deployment |
| `AUTHORIZE_API_KEY` | `********` | The API key clients will need to use when calling the entitlements | yes | -- |
| `azure.application-insights.instrumentation-key` | `********` | API Key for App Insights | yes | output of infrastructure deployment |
| `azure.activedirectory.client-id` | `********` | AAD client application ID | yes | output of infrastructure deployment |
| `azure.activedirectory.AppIdUri` | `api://${azure.activedirectory.client-id}` | URI for AAD Application | no | -- |
| `azure.activedirectory.session-stateless` | `true` | Flag run in stateless mode (needed by AAD dependency) | no | -- |
| `AZURE_TENANT_ID` | `********` | AAD tenant ID | yes | output of infrastructure deployment |
| `AZURE_CLIENT_ID` | `********` | AAD client ID | yes | output of infrastructure deployment |
| `AZURE_CLIENT_SECRET` | `********` | AAD client secret | yes | output of infrastructure deployment |
| `aad_client_id` | `********` | AAD client application ID | yes | output of infrastructure deployment |
| `KEYVAULT_URI` | ex `https://foo-keyvault.vault.azure.net/` | URI of KeyVault that holds application secrets | no | output of infrastructure deployment |
| `PARTITION_API` | ex `https://foo-partition.azurewebsites.net` | Partition Service API endpoint | no | output of infrastructure deployment |
| `azure.activedirectory.app-resource-id` | `********` | AAD client application ID | yes | output of infrastructure deployment |
| `appinsights_key` | `********` | API Key for App Insights | yes | output of infrastructure deployment |
| `cosmosdb_database`| ex OSDU-foo |Cosmos db name having subscriptions| no | output of infrastructure deployment |
| `LOG_PREFIX` | `notification` | Logging prefix | no | - |
| `entitlements_service_endpoint` | ex `https://foo-entitlements.azurewebsites.net` | Entitlements API endpoint | no | output of infrastructure deployment |
| `registeration_service_endpoint`| ex `https://foo-register.azurewebsites.net`| Registration Service API endpoint | no | output of infrastructure deployment |
| `partition_service_endpoint` | ex `https://foo-partition.azurewebsites.net` | Partition Service API endpoint | no | output of infrastructure deployment |
| `server_port`| 8089 | Port to host service locally | no | application-specific |
| `maxCacheSize` | 200| cache size | no | application-specific |
| `spring_application_name` | notification-azure| application name | no | - |
| `executor_n_threads` | 15| no of executor threads running at a time | no | application-specific |
| `max_concurrent_calls` | 15| max concurrent calls | no | application-specific |
| `max_lock_renew_duration_seconds` | 15| max lock duration before time out of a message | no | application-specific |
| `initial_subscription_manager_delay_seconds` | 0| delay in first listening of new subscriptions | no | application-specific |
| `consecutive_subscription_manager_delay_seconds` | 0| delay in consecutive listening of new subscriptions | no | application-specific |
| `service_bus_enabled` | true| feature flag for notification V2 | no | application-specific |
| `event_grid_to_service_bus_enabled` | false| will be deprecated | no | application-specific |
| `event_grid_enabled` | false| feature flag for notification V1| no | application-specific |
| `azure_entitlements_factory_enabled` | false| set to false | no | application-specific |
### Configure Maven
......
......@@ -3,14 +3,15 @@ The document enumerates the scenarios service is designed for, limitations of th
## When to use Notification Service?
TBD
When we have OSDU publishers of notifications and we want the notifications to get delivered to the external consumers outside the boundaries of OSDU with a secure,authenticated and authorized process.This way notification service creates a platform abstraction without exposing the infrastructure.
## How to use Notification Service.
#### Prerequisite
Please verify that the topic you want to use exists. If now, follow [this](https://community.opengroup.org/osdu/platform/system/notification/-/blob/master/provider/notification-azure/PLAYBOOK_FOR_TOPIC_CREATION.md) guide to create one.
#### 1. Publish to Event Grid Topic.
Using core-lib-azure [Event Grid facade](https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/blob/master/src/main/java/org/opengroup/osdu/azure/eventgrid/EventGridTopicStore.java), you can publish the events. [Reference](https://community.opengroup.org/osdu/platform/system/storage/-/blob/master/provider/storage-azure/src/main/java/org/opengroup/osdu/storage/provider/azure/MessageBusImpl.java#L67)
#### 1. Publish to Service Bus Topic.
Using core-lib-azure [Publisher facade](https://community.opengroup.org/osdu/platform/system/lib/cloud/azure/os-core-lib-azure/-/blob/master/src/main/java/org/opengroup/osdu/azure/publisherFacade/MessagePublisher.java), you can publish the events.
#### 2. Steps to Subscribe
1. Register your subscriber with Register Service. You will need to expose two endpoints
......@@ -23,14 +24,12 @@ Using core-lib-azure [Event Grid facade](https://community.opengroup.org/osdu/pl
3. The authZ mechanism for the Get endpoint, isn't done by entitlement service.The secret used during the handshake should be used by the service to authorize the jwt.
### Security compliance
1. Please refrain from printing fully qualified topic name in the logs.
1. Please refrain from printing subscriber details in the logs like endpoints and secrets.
### FAQs
1. __Event Grid is push endpoint. I have need for a pull mechanism, how can I achieve it?__
Notification service is not equiped for pull mechanism yet. You can publish to pull based products like Service Bus.
In case you want both pull and push subscribers, notification service can be an interface for only push (Event Grid).
A subscriber to that Event Grid Topic could be a Service Bus Topic. This Service Bus Topic in turn can have multiple
pull subscribers. [Reference](https://community.opengroup.org/osdu/platform/deployment-and-operations/infra-azure-provisioning/-/merge_requests/97/diffs)
1. __What is the difference between Notification v1 and v2?__ .
Notification service v1 is having event grid push based model which will be deprecated due to performance implications of app gateway.
However v2 supports pull mechanism by using service bus as message broker.
2. __Does notification service provide filtering capability?__
Not today.
......@@ -38,5 +37,11 @@ Not today.
3. __When should I create a topic vs using an existing one?__
If the nature of messages and subscribers overlap completely with an existing topic, re-use it.
4. __The topics.json isn't scalable model__
We are evaluating the need for the bringing up a store.
4. __How to onboard new topics?__
We can add the topics in topics.json and get them registered for notification process.
5. __How to safely migrate from v1 to v2 with 0 downtime?__
Follow the [help doc](https://community.opengroup.org/osdu/platform/system/notification/-/blob/master/provider/notification-azure/docs/MIGRATION.md) for migration which ensure 0 downtime
6. __Does notification service provides DLQ handling and notification miss alerts?__
Not today.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment