Skip to content

Server Configuration

Environment Variables

VariableDescriptionDefault
SPRING_DATASOURCE_URLJDBC PostgreSQL URL-
SPRING_DATASOURCE_USERNAMEDB userpesitwizard
SPRING_DATASOURCE_PASSWORDDB passwordpesitwizard
PESIT_CLUSTER_ENABLEDEnable clusteringfalse
POD_NAMEPod name (K8s)-
POD_NAMESPACENamespace (K8s)default

application.yml File

yaml
server:
  port: 8080

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/pesitwizard
    username: pesitwizard
    password: pesitwizard

pesitwizard:
  # Clustering configuration
  cluster:
    enabled: true
    name: pesitwizard-cluster

  # API security
  admin:
    username: admin
    password: admin

PeSIT Server Configuration

A PeSIT Wizard server can host multiple "logical PeSIT servers" on different ports.

Via API

bash
curl -X POST http://localhost:8080/api/servers \
  -u admin:admin \
  -H "Content-Type: application/json" \
  -d '{
    "serverId": "PESIT_SERVER",
    "port": 6502,
    "tlsPort": 5001,
    "autoStart": true,
    "maxConnections": 100,
    "readTimeout": 60000
  }'

Parameters

ParameterDescriptionDefault
serverIdServer identifier (PI_04)-
portTCP listening port6502
tlsPortTLS listening port5001
autoStartStart automaticallytrue
maxConnectionsMax simultaneous connections100
readTimeoutRead timeout (ms)60000

Partner Configuration

Partners are the clients authorized to connect.

Via API

bash
curl -X POST http://localhost:8080/api/v1/config/partners \
  -u admin:admin \
  -H "Content-Type: application/json" \
  -d '{
    "partnerId": "CLIENT_COMPANY",
    "name": "My Client",
    "password": "secret123",
    "enabled": true,
    "allowedOperations": ["READ", "WRITE"]
  }'

Parameters

ParameterDescription
partnerIdPartner identifier (PI_03)
nameDisplay name
passwordPassword (PI_05)
enabledPartner active
allowedOperationsAllowed operations (READ, WRITE)

Virtual File Configuration

Virtual files define the storage paths.

Via API

bash
curl -X POST http://localhost:8080/api/v1/config/files \
  -u admin:admin \
  -H "Content-Type: application/json" \
  -d '{
    "fileId": "PAYMENTS",
    "name": "Payment files",
    "sendDirectory": "/data/send/payments",
    "receiveDirectory": "/data/received/payments",
    "filenamePattern": "*.xml"
  }'

Parameters

ParameterDescription
fileIdVirtual file identifier (PI_12)
nameDisplay name
sendDirectoryDirectory for files to send
receiveDirectoryDirectory for received files
filenamePatternFilename pattern

Storage Directories

/data
├── send/           # Files to send
│   ├── payments/
│   └── statements/
├── received/       # Received files
│   ├── payments/
│   └── statements/
└── temp/           # Temporary files

Volume Configuration (Kubernetes)

yaml
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: pesitwizard-data
spec:
  accessModes: [ReadWriteOnce]
  resources:
    requests:
      storage: 50Gi

Logs and Monitoring

Log Levels

yaml
logging:
  level:
    com.pesitwizard: INFO
    com.pesitwizard.server.handler: DEBUG  # Session details
    com.pesitwizard.protocol: DEBUG        # PeSIT messages

Prometheus Metrics

The server exposes metrics on /actuator/prometheus:

  • pesitwizard.connections.active: Active connections
  • pesitwizard.transfers.total: Total number of transfers
  • pesitwizard.transfers.bytes.total: Total volume transferred
  • pesitwizard.errors.total: Number of errors

Health Checks

bash
# Readiness (ready to receive traffic)
curl http://localhost:8080/actuator/health/readiness

# Liveness (application alive)
curl http://localhost:8080/actuator/health/liveness

# Full health
curl http://localhost:8080/actuator/health

PeSIT Wizard - Solution PeSIT moderne pour les entreprises