Skip to content

Commit

Permalink
Update terraform variables
Browse files Browse the repository at this point in the history
  • Loading branch information
pierpaolo.didato@emeal.nttdata.com authored and pierpaolo.didato@emeal.nttdata.com committed Jun 3, 2024
1 parent 8c25230 commit fed7bd0
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 23 deletions.
4 changes: 2 additions & 2 deletions apps/onboarding-cdc/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ onboarding-cdc.retry=${ONBOARDING-CDC-RETRY:3}
quarkus.openapi-generator.codegen.spec.onboarding_functions_json.mutiny=true
quarkus.openapi-generator.codegen.spec.onboarding_functions_json.additional-model-type-annotations=@lombok.Builder; @lombok.NoArgsConstructor; @lombok.AllArgsConstructor
quarkus.openapi-generator.onboarding_functions_json.auth.api_key.api-key=${ONBOARDING-FUNCTIONS-API-KEY:example-api-key}
quarkus.rest-client."org.openapi.quarkus.onboarding_functions_json.api.OrchestrationApi".url=${ONBOARDING_FUNCTIONS_URL:http://localhost:8080}
quarkus.rest-client."org.openapi.quarkus.onboarding_functions_json.api.OrchestrationApi".read-timeout=60000
quarkus.rest-client."org.openapi.quarkus.onboarding_functions_json.api.NotificationsApi".url=${ONBOARDING_FUNCTIONS_URL:http://localhost:8080}
quarkus.rest-client."org.openapi.quarkus.onboarding_functions_json.api.NotificationsApi".read-timeout=60000
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package it.pagopa.selfcare.onboarding.entity;

public enum Topic {
SC_CONTRACTS_FD("SC-Contracts-FD"),
SC_CONTRACTS_FD("Selfcare-FD"),
SC_CONTRACTS_SAP("SC-Contracts-SAP"),
SC_CONTRACTS("SC-Contracts");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import org.eclipse.microprofile.rest.client.inject.RestClient;
import org.openapi.quarkus.core_json.api.InstitutionApi;
import org.openapi.quarkus.core_json.model.InstitutionResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.Map;
import java.util.Objects;
Expand All @@ -42,7 +40,6 @@ public class NotificationEventServiceDefault implements NotificationEventService
private final NotificationConfig notificationConfig;
private final NotificationMapperFactory notificationMapperFactory;
private final TokenRepository tokenRepository;
private static final Logger log = LoggerFactory.getLogger(NotificationEventServiceDefault.class);
private final ObjectMapper mapper;

public NotificationEventServiceDefault(ProductService productService,
Expand All @@ -68,11 +65,10 @@ public void send(ExecutionContext context, Onboarding onboarding, QueueEvent que
try {
Optional<Token> token = tokenRepository.findByOnboardingId(onboarding.getId());
if (token.isEmpty()) {
log.warn("Token not found for onboarding {}", onboarding.getId());
context.getLogger().warning("Token not found for onboarding " + onboarding.getId());
return;
}
InstitutionResponse institution = institutionApi.retrieveInstitutionByIdUsingGET(onboarding.getInstitution().getId());

for (String consumer : product.getConsumers()) {
final String topic = config.get(consumer.toLowerCase()).topic();
NotificationMapper notificationMapper = notificationMapperFactory.create(topic);
Expand All @@ -81,8 +77,8 @@ public void send(ExecutionContext context, Onboarding onboarding, QueueEvent que
context.getLogger().info("Sent notification on topic: " + topic);
}
} catch (Exception e) {
context.getLogger().warning("Error during send notification for object with ID " + onboarding.getId() + ". Error: " + e.getMessage());
throw new NotificationException("Impossible to send notification for object " + onboarding);
context.getLogger().warning("Error during send notification for onboarding with ID " + onboarding.getId() + ". Error: " + e.getMessage());
throw new NotificationException("Impossible to send notification for onboarding " + onboarding);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,6 @@ notification.consumers.standard.key=${EVENTHUB_SC_CONTRACTS_SELFCARE_WO_KEY_LC:t
notification.consumers.sap.topic=${SAP_TOPIC_NAME:SC-Contracts-SAP}
notification.consumers.sap.name=${SAP_SHARED_ACCESS_KEY_NAME:test}
notification.consumers.sap.key=${EVENTHUB_SC_CONTRACTS_SAP_SELFCARE_WO_KEY-LC:test}
notification.consumers.fd.topic=${FD_TOPIC_NAME:SC-Contracts-FD}
notification.consumers.fd.topic=${FD_TOPIC_NAME:Selfcare-FD}
notification.consumers.fd.name=${FD_SHARED_ACCESS_KEY_NAME:test}
notification.consumers.fd.key=${EVENTHUB_SC_CONTRACTS_FD_SELFCARE_WO_KEY_LC:test}
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ app_settings = {
"SAP_TOPIC_NAME" = "SC-Contracts-SAP"
"FD_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB_SC_CONTRACTS_FD_SELFCARE_WO_KEY_LC" = "string"
"FD_TOPIC_NAME" = "SC-Contracts-FD"
"FD_TOPIC_NAME" = "Selfcare-FD"
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,5 @@ app_settings = {
"SAP_TOPIC_NAME" = "SC-Contracts-SAP"
"FD_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB_SC_CONTRACTS_FD_SELFCARE_WO_KEY_LC" = "@Microsoft.KeyVault(SecretUri=https://selc-d-kv.vault.azure.net/secrets/eventhub-selfcare-fd-external-interceptor-wo-key-lc/)"
"FD_TOPIC_NAME" = "SC-Contracts-FD"
"FD_TOPIC_NAME" = "Selfcare-FD"
}
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ app_settings = {
"BACKOFF_COEFFICIENT" = "1"
"EVENT_HUB_BASE_PATH" = "https://selc-p-eventhub-ns.servicebus.windows.net",
"STANDARD_SHARED_ACCESS_KEY_NAME" = "selfcare-wo"
"EVENTHUB-SC-CONTRACTS-SELFCARE-WO-KEY-LC" = "string"
"EVENTHUB_SC_CONTRACTS_SELFCARE_WO_KEY_LC" = "string"
"STANDARD_TOPIC_NAME" = "SC-Contracts"
"SAP_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB-SC-CONTRACTS-SAP-SELFCARE-WO-KEY-LC" = "string"
"EVENTHUB_SC_CONTRACTS_SAP_SELFCARE_WO_KEY_LC" = "string"
"SAP_TOPIC_NAME" = "SC-Contracts-SAP"
"FD_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB-SC-CONTRACTS-FD-SELFCARE-WO-KEY-LC" = "string"
"FD_TOPIC_NAME" = "SC-Contracts-FD"
"EVENTHUB_SC_CONTRACTS_FD_SELFCARE_WO_KEY_LC" = "string"
"FD_TOPIC_NAME" = "Selfcare-FD"

## IGNORE VALUES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ app_settings = {
"USER_MS_ACTIVE" = "true",
"EVENT_HUB_BASE_PATH" = "https://selc-p-eventhub-ns.servicebus.windows.net",
"STANDARD_SHARED_ACCESS_KEY_NAME" = "selfcare-wo"
"EVENTHUB-SC-CONTRACTS-SELFCARE-WO-KEY-LC" = "eventhub-sc-contracts-selfcare-wo-key-lc"
"EVENTHUB_SC_CONTRACTS_SELFCARE_WO_KEY_LC" = "eventhub-sc-contracts-selfcare-wo-key-lc"
"STANDARD_TOPIC_NAME" = "SC-Contracts"
"SAP_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB-SC-CONTRACTS-SAP-SELFCARE-WO-KEY-LC" = "eventhub-sc-contracts-sap-external-interceptor-wo-key-lc"
"EVENTHUB_SC_CONTRACTS_SAP_SELFCARE_WO_KEY_LC" = "eventhub-sc-contracts-sap-external-interceptor-wo-key-lc"
"SAP_TOPIC_NAME" = "SC-Contracts-SAP"
"FD_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB-SC-CONTRACTS-FD-SELFCARE-WO-KEY-LC" = "eventhub-selfcare-fd-external-interceptor-wo-key-lc"
"FD_TOPIC_NAME" = "SC-Contracts-FD"
"EVENTHUB_SC_CONTRACTS_FD_SELFCARE_WO_KEY_LC" = "eventhub-selfcare-fd-external-interceptor-wo-key-lc"
"FD_TOPIC_NAME" = "Selfcare-FD"

##ARUBA SIGNATURE
"PAGOPA_SIGNATURE_SOURCE" = "aruba",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ app_settings = {
"SAP_TOPIC_NAME" = "SC-Contracts-SAP"
"FD_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB-SC-CONTRACTS-FD-SELFCARE-WO-KEY-LC" = "string"
"FD_TOPIC_NAME" = "SC-Contracts-FD"
"FD_TOPIC_NAME" = "Selfcare-FD"

## IGNORE VALUES

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ app_settings = {
"SAP_TOPIC_NAME" = "SC-Contracts-SAP"
"FD_SHARED_ACCESS_KEY_NAME" = "external-interceptor-wo"
"EVENTHUB_SC_CONTRACTS_FD_SELFCARE_WO_KEY_LC" = "eventhub-selfcare-fd-external-interceptor-wo-key-lc"
"FD_TOPIC_NAME" = "SC-Contracts-FD"
"FD_TOPIC_NAME" = "Selfcare-FD"

##ARUBA SIGNATURE
"PAGOPA_SIGNATURE_SOURCE" = "disabled",
Expand Down

0 comments on commit fed7bd0

Please sign in to comment.