Skip to main content
pn-paper-channel uses Spring Boot property files. The base defaults live in src/main/resources/application.properties. Environment-specific overrides are applied via environment variables (in production, injected by CloudFormation) or by placing an application.properties file in the config/ directory (for local development).
In production, all properties are set through CloudFormation ContainerEnvEntry* parameters. The environment variable name is derived from the property key by uppercasing and replacing dots and hyphens with underscores (e.g., pn.paper-channel.refinement-durationPN_PAPERCHANNEL_REFINEMENTDURATION).

Core timing

PropertyDefaultDescription
pn.paper-channel.refinement-duration10dDuration of the perfezionamento (refinement) period. Accepts duration strings such as 10d, 5h, 30m, 60s.
pn.paper-channel.compiuta-giacenza-ar-duration30dDuration of the compiuta giacenza for AR products. Same format as refinement-duration.
pn.paper-channel.enable-truncated-date-for-refinement-checktrueWhen true, truncates the datetime to a local date before comparing it against the refinement deadline.
pn.paper-channel.cloudwatch-metric-cron*/30 * * * * *Cron expression controlling how often CloudWatch metrics are pushed.

Feature flags

PropertyDefaultDescription
pn.paper-channel.pnaddr001continue-flowtrueFor PNADDR001 address errors: true continues the flow; false persists the error to the database.
pn.paper-channel.pnaddr002continue-flowfalseFor PNADDR002 address errors: true continues the flow; false persists the error to the database.
pn.paper-channel.prepare-two-phasestrueEnables the two-phase PREPARE flow (phase 1 normalize address, phase 2 execute).
pn.paper-channel.enable-retry-con996trueEnables automatic retry of CON996 messages.
pn.paper-channel.sendCon020trueWhen true, sends CON020 progress events to Delivery Push.
pn.paper-channel.enabledocfilterruleenginetrueEnables the rule-engine-based document filter algorithm for selecting which attachments to send.
pn.paper-channel.enable-simplified-tender-flowfalseEnables the new simplified tender workflow. Set to true in production (microservice-dev-cfg.json sets it to true).
pn.paper-channel.paper-tracker-enabledfalseEnables the Paper Tracker feature.

AWS configuration

DynamoDB tables

PropertyLocal defaultDescription
aws.dynamodb-request-delivery-tableRequestDeliveryDynamoTableTable that stores paper delivery requests.
aws.dynamodb-address-tableAddressDynamoTableTable that stores request addresses (KMS-encrypted).
aws.dynamodb-tender-tableTenderDynamoTableLegacy tender table.
aws.dynamodb-paper-channel-tender-tablepn-PaperChannelTenderNew simplified-flow tender table.
aws.dynamodb-paper-channel-geo-key-tablepn-PaperChannelGeokeyGeokey versions per tender and product.
aws.dynamodb-paper-channel-cost-tablepn-PaperChannelCostCosts per tender, product, lot, and zone.
aws.dynamodb-delivery-driver-tableDeliveryDriverDynamoTableLegacy delivery driver records.
aws.dynamodb-cost-tableCostDynamoTableLegacy cost records.
aws.dynamodb-zone-tableZoneDynamoTableCountry-to-zone mapping.
aws.dynamodb-cap-tableCapDynamoTableItalian CAP (postal code) to lot mapping.
aws.dynamodb-delivery-file-tableDeliveryFileDynamoTableTracks tender file uploads.
aws.dynamodb-paper-request-error-tablePaperRequestErrorDynamoTableRecords request processing errors.
aws.dynamodb-paper-events-tablePaperEventsDynamoTablePaper delivery events with TTL.
aws.dynamodb-client-tableClientDynamoTableClient ID and prefix-value mappings.
aws.dynamodb-attachments-config-tableAttachmentsConfigTime-based configuration for attachment rules.
aws.dynamodb-paper-event-error-tablePaperEventErrorDynamoTableOut-of-order event errors with TTL.
aws.dynamodb-paper-channel-delivery-driver-tablepn-PaperChannelDeliveryDriverNew simplified-flow delivery driver table.

SQS queues

PropertyLocal defaultDescription
pn.paper-channel.queue-internallocal-paper_channel_requestsInternal scheduled-requests queue.
pn.paper-channel.queue-delivery-pushlocal-delivery-push-inputsOutput queue sending events to Delivery Push.
pn.paper-channel.queue-external-channellocal-ext-channels-outputsInput queue receiving events from External Channel.
pn.paper-channel.queue-national-registrieslocal-ext-channels-inputsInput queue receiving responses from National Registries.
pn.paper-channel.queue-f24pn-f24_to_paperchannelInput queue receiving F24 responses.
pn.paper-channel.queue-radd-altlocal-radd-alt-to-paper-channelInput queue from RADD Alt.
pn.paper-channel.queue-normalize-addresslocal-paper-normalize-addressInternal queue for PREPARE phase 1 (address normalization).
pn.paper-channel.queue-paperchannel-to-delayerlocal-paperchannel_to_delayerOutput queue sending events to pn-delayer.
pn.paper-channel.queue-delayer-to-paperchannellocal-delayer_to_paperchannelInput queue receiving events back from pn-delayer.
pn.paper-channel.queue-url-ocr-inputslocal-ocr-inputsOutput queue for OCR requests.
pn.paper-channel.queue-region-ocr-inputsus-east-1AWS region of the OCR input queue.

KMS

PropertyLocal defaultDescription
aws.kms.keyId(set from LocalStack logs)ARN of the KMS symmetric key used to encrypt address data in DynamoDB.

EventBridge

PropertyLocal defaultDescription
pn.paper-channel.eventbus.namepaper-channel-event-bus-nameName (or ARN) of the EventBridge event bus. In production this is arn:aws:events:<region>:<account>:event-bus/<project>-CoreEventBus.
pn.paper-channel.eventbus.detail.typePaperChannelOutcomeEventThe detail-type field set on outgoing EventBridge events.
pn.paper-channel.eventbus.sourcepn-paper-channelThe source field set on outgoing EventBridge events.

Client base paths and identifiers

PropertyLocal defaultDescription
pn.paper-channel.client-safe-storage-basepathhttp://localhost:8120Base URL of the Safe Storage service.
pn.paper-channel.client-national-registries-basepathhttp://localhost:1080Base URL of the National Registries service.
pn.paper-channel.client-external-channel-basepathhttp://localhost:1080Base URL of the External Channel service.
pn.paper-channel.client-datavault-basepathhttp://localhost:1080Base URL of the Data Vault service.
pn.paper-channel.client-address-manager-basepathhttp://localhost:1080Base URL of the Address Manager service.
pn.paper-channel.client-f24-basepathhttp://localhost:1080Base URL of the F24 service.
pn.paper-channel.safe-storage-cx-idpn-cons-000Client ID sent to Safe Storage.
pn.paper-channel.x-pagopa-extch-cx-idpn-cons-000Client ID sent to External Channel.
pn.paper-channel.address-manager-cx-idpn-paper-channelClient ID sent to Address Manager.
pn.paper-channel.address-manager-api-key_API key for Address Manager (set from Secrets Manager in production).
pn.paper-channel.national-registry-cx-idpn-paper-channelClient ID sent to National Registries.
pn.paper-channel.f24-cx-idpn-paper-channelClient ID sent to F24.

F24 client

PropertyDefaultDescription
pn.paper-channel.f24client.timeout-millis30000Read timeout in milliseconds for F24 service API calls. Should align with the visibility timeout of the internal queue.
pn.paper-channel.f24client.retry-max-attempts0Maximum number of retry attempts for F24 client calls.

Retry attempt counts

PropertyDefaultDescription
pn.paper-channel.attempt-safe-storage3Max attempts to fetch a file from Safe Storage.
pn.paper-channel.attempt-queue-safe-storage-1Max attempts via queue for Safe Storage retries (-1 = unlimited).
pn.paper-channel.attempt-queue-external-channel3Max attempts via queue to call External Channel.
pn.paper-channel.attempt-queue-national-registries3Max attempts via queue to call National Registries.
pn.paper-channel.attempt-queue-address-manager3Max attempts via queue to call Address Manager.
pn.paper-channel.attempt-queue-f243Max attempts via queue to call F24.
pn.paper-channel.attempt-queue-zip-handle3Max attempts for ZIP handling.

TTL (time-to-live)

PropertyDefaultDescription
pn.paper-channel.ttl-prepare14TTL in days for PREPARE-phase records.
pn.paper-channel.ttl-execution-N_89011TTL in days for 890 (raccomandata) execution records.
pn.paper-channel.ttl-execution-N_RS11TTL in days for RS execution records.
pn.paper-channel.ttl-execution-N_AR12TTL in days for AR execution records (national).
pn.paper-channel.ttl-execution-I_AR13TTL in days for AR execution records (international).
pn.paper-channel.ttl-execution-I_RS14TTL in days for RS execution records (international).
pn.paper-channel.ttl-execution-days-demat365TTL in days for dematerialization event records.
pn.paper-channel.ttl-execution-days-meta365TTL in days for meta event records.

Cost rounding

PropertyDefaultDescription
pn.paper-channel.cost-rounding-modeHALF_UPJava RoundingMode used for simplified cost calculation. Allowed values: HALF_UP, UP.

Charge calculation modes

PropertyDefaultDescription
pn.paper-channel.date-charge-calculation-modes1970-01-01T00:00:00Z;AAR,2024-01-01T00:00:00Z;COMPLETESemicolon-separated pairs of startConfigurationTime;calculationMode. Multiple entries are comma-delimited. Supported modes: AAR, COMPLETE.

CloudWatch metrics

PropertyDefaultDescription
pn.paper-channel.cloudwatch-metric-cron*/30 * * * * *Spring cron expression for pushing custom metrics to CloudWatch.

Allowed redrive status codes

PropertyDefaultDescription
pn.paper-channel.allowed-redrive-progress-status-codesRECAG005C,RECAG006C,RECAG007C,RECAG008CComma-separated status codes for which automatic redrive is allowed after a successful OK sent to Delivery Push.

Miscellaneous

PropertyDefaultDescription
pn.paper-channel.defaultattachmentconfigcapZIP##DEFAULTDefault parent CAP code for new CAP entries inserted into AttachmentsConfig.
pn.paper-channel.required-demats23LComma-separated list of mandatory dematerialization codes (currently only applies to PNAG012 events).
pn.paper-channel.complex-refinement-codesRECAG007CComma-separated 890 status codes that must use the legacy complex refinement flow.
pn.paper-channel.paper-weight5Weight (grams) of a single paper sheet.
pn.paper-channel.letter-weight5Base weight (grams) of the envelope/letter.
pn.paper-channel.paper-tracker-product-listARComma-separated list of product types tracked by the Paper Tracker feature.
pn.paper-channel.radd-coverage-search-modeLIGHTSearch mode for RADD coverage lookups.

Build docs developers (and LLMs) love