Properties
Properties you can use to configure FactCast
Schemaregistry
Property | Description | Default |
---|---|---|
factcast.store.schemaRegistryUrl | if a schemaRegistryUrl is defined, FactCast goes into validating mode. The only protocols allowed here are “http”, “https”, “classpath” and “file”. Note that http(s) and file always require two slashes after the colon, e.g. “https://someserver/…” or “file:///root/folder/…”. | |
factcast.store.validationEnabled | Can be used for disabling Fact validation if a schemaRegistryUrl is defined. Useful for mass data ingestion. | true |
factcast.store.persistentRegistry | if fetched Schema and Transformation Documents are persisted into Postgres | false |
factcast.store.allowUnvalidatedPublish | If validation is enabled, this controls if publishing facts, that are not validatable (due to missing meta-data or due to missing schema in the registry) are allowed to be published or should be rejected. | false |
factcast.store.schemaStoreRefreshCron | defines the cron schedule for refreshing the SchemaRegistry by querying for the latest remote changes | */60 * * * * * |
factcast.store.allowSchemaReplace | If a schema can be replaced by an updated version from the registry (not a good idea in production environments) | false |
Transformation-Registry
Property | Description | Default |
---|---|---|
factcast.store.persistentTransformationCache | if Transformed Fact payloads are persistently cached into Postgres | false |
factcast.store.inMemTransformationCacheCapacity | when using the inmem impl of the transformation cache, this is the max number of entries cached. The minimum value here is 100. | 100 |
factcast.store.deleteTransformationsStaleForDays | when using the persistent impl of the transformation cache, this is the min number of days a transformation result is not read in order to be considered stale. This should free some space in a regular cleanup job. Must be a positive number. | 14 |
factcast.store.transformationCacheCompactCron | defines the cron schedule for compacting the transformation result cache | 0 0 0 * * * (at midnight) |
Performance / Reliability
Property | Description | Default |
---|---|---|
factcast.store.factNotificationBlockingWaitTimeInMillis | Controls how long to block waiting for new notifications from the database (Postgres LISTEN/ NOTIFY mechanism). When this time exceeds the notifications is repeated. Minimum value is 5000. | 15000 (15sec) |
factcast.store.factNotificationMaxRoundTripLatencyInMillis | When FactCast did not receive any notifications after factNotificationBlockingWaitTimeInMillis milliseconds it validates the health of the database connection. For this purpose it sends an internal notification to the database and waits for the given time to receive back an answer. If the time is exceeded the database connection is renewed. Minimum value is 50. | 200 |
factcast.store.factNotificationNewConnectionWaitTimeInMillis | how much time to wait between invalidating and acquiring a new connection. note: This parameter is only applied in the part of FactCast which deals with receiving and forwarding database notifications. Minimum value is 10. | 100 |
factcast.store.page-size | How many Facts to fetch from the database in one go. Higher values mean more memory usage. Must be positive. | 50 |
factcast.store.indexCheckCron | Cron expression defining a routine check for index validity | 0 0 3 * * * (3 am) |
factcast.store.tailIndexingEnabled | enable/ disable tail indexing | false |
factcast.store.tailManagementCron | cron schedule when tail rotation should be carried out | 0 0 0 * * * |
factcast.store.tailGenerationsToKeep | the number of tail indexes to keep. The higher the number, the slower the inserts. Probably 2 or 3 is a good value unless you have a very high tail rebuild frequency and not permanently connected applications (like offline clients for instance). Must be a positive number, maximum is 128. | 3 |
factcast.store.minimumTailAge | minimum age of the youngest tail index, before a new one is created | 7 days |
factcast.store.tailCreationTimeout | Index creation can hang for a long time in case of many open transactions. To avoid this, you can specify a timeout. We will subtract 5 seconds from the given duration before applying it to setTimeout. | 1d |
factcast.store.transformationCachePageSize | Defines the max number of Facts being scheduled for transformation in one go. Must be positive and not exceed 32000. | |
factcast.store.sizeOfThreadPoolForSubscriptions | This is the number of threads we create for handling new subscriptions requests. It’s implemented via a fixed thread pool. As soon as the subscription request finishes or enters phase 3 (follow) the thread is freed up again. In earlier versions we used the common FJP which limits the parallelism to the number of cores - 1. If you ever encounter too much database load or too high waiting time for subscriptions this can be an option. | |
factcast.store.sizeOfThreadPoolForBufferedTransformations | This is the number of threads we create for handling buffered transformations. It’s implemented via work stealing thread pool. In early versions we used the common FJP which limits the parallelism to the number of cores - 1. | |
factcast.store.readOnlyModeEnabled | Configures FactCast to work in read-only mode. You cannot publish any events in this mode and certain functionality like tail index generation or state token generation is disabled. You can still use a persistent schema store or transformation cache, however they will work in read-only mode. Additionally, liquibase is disabled. | false |
factcast.store.enumerationDirectModeEnabled | Despite of a Schema-Registry being defined or not, if set to true, enumeration of types or namespace will examine the data in the store directly, so that you only see data from already published facts. | false |
Snapshots
InMem-Snapshots
Property | Description | Default |
---|---|---|
factcast.snapshot.local.mem.deleteSnapshotStaleForDays | min number of days a snapshot is kept even though it is not read anymore. Must be a positive number. | 90 |
InMemAndDisk-Snapshots
Property | Description | Default |
---|---|---|
factcast.snapshot.local.disk.pathToSnapshots | path to store the snapshots in the file system. | java.io.tmpdir |
factcast.snapshot.local.disk.maxDiskSpace | max disk space to be used by the SnapshotDiskRepository. The oldest Snapshots will start to be removed after reaching 90% of the allocated space, never reaching 100%. Use 0 for unlimited disk space | 0 |
RedisSnapshots
Property | Description | Default |
---|---|---|
factcast.snapshot.redis.deleteSnapshotStaleForDays | min number of days a snapshot is kept even though it is not read anymore. Must be a positive number. | 90 |
factcast.snapshot.redis.snapshotCacheRedissonCodec | optional configuration of the codec used for serializing objects from and into the snapshot. When set to RedissonDefault | MarshallingCodec |
gRPC
Properties you can use to configure gRPC:
gRPC Client
Property | Description | Default | Example |
---|---|---|---|
grpc.client.factstore.credentials | Deprecated. Please use factcast.grpc.client.user and factcast.grpc.client.password instead | none | myUserName:mySecretPassword |
grpc.client.factstore.address | the address(es) fo the factcast server | none | static://localhost:9090 |
grpc.client.factstore.negotiationType | Usage of TLS or Plaintext? | TLS | PLAINTEXT |
grpc.client.factstore.enable-keep-alive | Configures whether keepAlive should be enabled. Recommended for long running (follow) subscriptions | false | true |
grpc.client.factstore.keep-alive-time | The default delay before sending keepAlives. Defaults to 60s. Please note that shorter intervals increase the network burden for the server. | 300 | |
grpc.client.factstore.keep-alive-without-calls | Configures whether keepAlive will be performed when there are no outstanding RPCs on a connection. | false | true |
gRPC Client recommended settings
grpc.client.factstore.enable-keep-alive=true
grpc.client.factstore.keep-alive-time=300
grpc.client.factstore.keep-alive-without-calls=true
Further details can be found here : net.devh.boot.grpc.client.config.GrpcChannelProperties
.
FactCast client specific
Property | Description | Default | Example |
---|---|---|---|
factcast.grpc.client.id | Server-side logging mentions this optional id if set in order to help with debugging. If this property is not set, it falls back to the value of spring.application.name | ${spring.application.name} | myClient |
factcast.grpc.client.user | User if factcast-security is enabled. | myUser | |
factcast.grpc.client.password | Password if factcast-security is enabled. | myPassword | |
factcast.grpc.client.enable-fast-forward | If the server supports it, enables fast forwarding. This is supposed to speedup frequent queries that cluster around the end of the global Fact-Stream and thus can use dedicated temporary rolling indexes. | true | false |
factcast.grpc.client.max-inbound-message-size | The GRPC server will chunk messages to not exceed this. Note that one message might contain up to 1000 facts. This value disregards compression. The maximum for this value is 32MB, the minimum is 2 MB. Note that this also limits the maximum transaction bulk size. | 8m | 16m |
factcast.grpc.client.resilience.enabled | Enables resilience mode for subscriptions. If enabled, subscriptions that fail due to networking errors will be transparently resubscribed. (since 0.5.5) | true | false |
factcast.grpc.client.resilience.window | Defines the window in which a maximum of retries is defined. (since 0.5.5) | PT30S (30 seconds) | PT2M (2 Minutes) |
factcast.grpc.client.resilience.attempts | Defines the maximum number of attempts that will be done (within a time window defined by resilience.window) before failing and escalating the last exception to the application. (since 0.5.5) | 10 | 25 |
factcast.grpc.client.resilience.interval | Defines the wait time between two attempts. (since 0.5.5) | PT0.1S (100 millis) | PT0.5S |
factcast.grpc.client.ignore-duplicate-facts | Ignores and skips duplicate exceptions during publishing (does not include conditional publishing when using locks). This might be convenient in cases where you published to a factcast server and get a connection error back (you cannot possibly know if the publish on the server succeeded or not). If you have resilience enabled, the publish would be retried and might (if the first was successful) result in a DuplicateFactException. Setting this to true will make factcast just ignore the exception and go on. There might be a performance problem resulting from this: If you publish a batch of facts and a DuplicateFactException is recieved, factcast will fall back to publishing every single Fact from the batch one-by-one in order to make sure, that after your call, all Facts that are not duplicates will be published. | false | true |
grpc Server
Property | Description | Default | Example |
---|---|---|---|
grpc.server.permit-keep-alive-without-calls | Configures whether clients are allowed to send keep-alive HTTP/2 PINGs even if there are no outstanding RPCs on the connection | false | true |
grpc.server.permit-keep-alive-time | Specifies the most aggressive keep-alive time in seconds clients are permitted to configure. Defaults to 5min. | 300 | 100 |
factcast.grpc.bandwith.numberOfFollowRequestsAllowedPerClientPerMinute | after the given number of follow requests from the same client per minute, subscriptions are rejected with RESOURCE_EXHAUSTED | 5 | 5 |
factcast.grpc.bandwith.initialNumberOfFollowRequestsAllowedPerClient | ramp-up to compensate for client startup | 50 | 50 |
factcast.grpc.bandwith.numberOfCatchupRequestsAllowedPerClientPerMinute | after the given number of catchup requests from the same client per minute, subscriptions are rejected with RESOURCE_EXHAUSTED | 6000 | 6000 |
factcast.grpc.bandwith.initialNumberOfCatchupRequestsAllowedPerClient | ramp-up to compensate for client startup | 36000 | 36000 |
factcast.grpc.bandwith.disabled | completely disables checking if set to true | false | true |
gRPC Server recommended settings
grpc.server.permit-keep-alive-without-calls=true
grpc.server.permit-keep-alive-time=100
Blacklist
Property | Description | Default | Example |
---|---|---|---|
factcast.blacklist.type | Configures where the list of blacklisted facts is retrieved from. One of [POSTGRES, RESOURCE]. | POSTGRES | — |
factcast.blacklist.location | Only required if type=RESOURCE. Specifies the URL where the JSON file containing the blacklist is located. | classpath:blacklist.json | file:/some/path/blocked-facts.json |
Testing
Property | Description | Default |
---|---|---|
factcast.store.integrationTestMode | when set to true, disables all non-essential memory-internal caches, timing might differ to production of course. | false |
UI
Property | Description | Default |
---|---|---|
vaadin.productionMode | Should be set to true, otherwise vaadin tries to generate a dev bundle which is not necessary, and probably will fail. | false |
Further details can be found here : net.devh.boot.grpc.server.config.GrpcServerProperties
.
Last modified
October 23, 2024
: #3208: clarification (83c460fcf)