Skip to content

Commit

Permalink
renamed somma AKKA_ in env variables to PEKKO_
Browse files Browse the repository at this point in the history
Signed-off-by: Stanchev Aleksandar <aleksandar.stanchev@bosch.com>
  • Loading branch information
alstanchev authored and Aleksandar Stanchev committed Aug 28, 2023
1 parent 2ce8599 commit f0d1a62
Show file tree
Hide file tree
Showing 12 changed files with 38 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ditto {
pekko {

management.http.port = 25610
management.http.port = ${?AKKA_MANAGEMENT_PORT}
management.http.port = ${?PEKKO_MANAGEMENT_PORT}

remote {
# for debugging purpose
Expand Down
12 changes: 6 additions & 6 deletions connectivity/service/src/main/resources/connectivity.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@ pekko {

# Setting this to less than Inf may generate occasional failures for not very active HTTP-PUSH connections.
idle-timeout = Inf
idle-timeout = ${?AKKA_HTTP_CLIENT_IDLE_TIMEOUT}
idle-timeout = ${?PEKKO_HTTP_CLIENT_IDLE_TIMEOUT}

parsing {
max-uri-length = 8k # default: 2k
Expand All @@ -1055,7 +1055,7 @@ pekko {
# This timeout configures a maximum amount of time, while the connection can be kept open.
# Helps the process of rebalancing between service instances when reaching the target through a load-balancer
max-connection-lifetime = Inf
max-connection-lifetime = ${?AKKA_HTTP_HOSTPOOL_MAX_CONNECTION_LIFETIME}
max-connection-lifetime = ${?PEKKO_HTTP_HOSTPOOL_MAX_CONNECTION_LIFETIME}
}
}
cluster {
Expand All @@ -1066,18 +1066,18 @@ pekko {
# upon Shard restart. i.e. if the Shard is started on a different ShardRegion
# due to rebalance or crash.
remember-entities = on
remember-entities = ${?AKKA_CLUSTER_SHARDING_REMEMBER_ENTITIES}
remember-entities = ${?PEKKO_CLUSTER_SHARDING_REMEMBER_ENTITIES}

# When 'remember-entities' is enabled and the state store mode is ddata this controls
# how the remembered entities and shards are stored. Possible values are "eventsourced" and "ddata"
# Default is ddata for backwards compatibility.
remember-entities-store = "eventsourced"
remember-entities-store = ${?AKKA_CLUSTER_SHARDING_REMEMBER_ENTITIES_STORE}
remember-entities-store = ${?PEKKO_CLUSTER_SHARDING_REMEMBER_ENTITIES_STORE}

# The shard saves persistent snapshots after this number of persistent events.
# Snapshots are used to reduce recovery times.
snapshot-after = 200 # default: 1000
snapshot-after = ${?AKKA_CLUSTER_SHARDING_SNAPSHOT_AFTER}
snapshot-after = ${?PEKKO_CLUSTER_SHARDING_SNAPSHOT_AFTER}

journal-plugin-id = "pekko-contrib-mongodb-persistence-connection-remember-journal"
snapshot-plugin-id = "pekko-contrib-mongodb-persistence-connection-remember-snapshots"
Expand Down Expand Up @@ -1122,7 +1122,7 @@ pekko {
# default timeout is 5s for the phase - give a longer timeout in order
# to be able to send disconnect announcements of connections:
timeout = 10s
timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_BEFORE_SERVICE_UNBIND_TIMEOUT}
timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_BEFORE_SERVICE_UNBIND_TIMEOUT}
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/ditto/templates/connectivity-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ spec:
- name: PROMETHEUS_PORT
value: "{{ .Values.global.prometheus.port }}"
{{- end }}
- name: AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN
- name: PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN
value: "{{ .Values.connectivity.config.mongodb.journalWriteConcern }}"
- name: AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN
- name: PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN
value: "{{ .Values.connectivity.config.mongodb.snapsWriteConcern }}"
- name: BREAKER_MAXTRIES
value: "{{ .Values.connectivity.config.mongodb.journalCircuitBreaker.maxTries }}"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/ditto/templates/policies-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,9 @@ spec:
value: "{{ .Values.global.cluster.downingStableAfter }}"
- name: CLUSTER_DOWNING_DOWN_ALL_WHEN_UNSTABLE
value: "{{ .Values.global.cluster.downAllWhenUnstable }}"
- name: AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN
- name: PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN
value: "{{ .Values.policies.config.mongodb.journalWriteConcern }}"
- name: AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN
- name: PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN
value: "{{ .Values.policies.config.mongodb.snapsWriteConcern }}"
- name: BREAKER_MAXTRIES
value: "{{ .Values.policies.config.mongodb.journalCircuitBreaker.maxTries }}"
Expand Down
4 changes: 2 additions & 2 deletions deployment/helm/ditto/templates/things-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,9 @@ spec:
value: "{{ .Values.global.cluster.downingStableAfter }}"
- name: CLUSTER_DOWNING_DOWN_ALL_WHEN_UNSTABLE
value: "{{ .Values.global.cluster.downAllWhenUnstable }}"
- name: AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN
- name: PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN
value: "{{ .Values.things.config.mongodb.journalWriteConcern }}"
- name: AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN
- name: PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN
value: "{{ .Values.things.config.mongodb.snapsWriteConcern }}"
- name: BREAKER_MAXTRIES
value: "{{ .Values.things.config.mongodb.journalCircuitBreaker.maxTries }}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@
"$id": "/properties/clientCount",
"type": "integer",
"title": "Client count",
"description": "The client count defines how many clients are instantiated for this connection. Each client opens a separate 'physical' connection and thus raises the overall availability and throughput of the connection. Clients are always instantiated on separate AKKA cluster nodes while having only a single client per node. Therefore the max client count is limited by the number of cluster nodes.",
"description": "The client count defines how many clients are instantiated for this connection. Each client opens a separate 'physical' connection and thus raises the overall availability and throughput of the connection. Clients are always instantiated on separate PEKKO cluster nodes while having only a single client per node. Therefore the max client count is limited by the number of cluster nodes.",
"default": 1,
"minimum": 1,
"maximum": 9,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"$id": "/properties/targetActorSelection",
"type": "string",
"title": "Target actor selection",
"description": "Selects the AKKA actors which should receive this command",
"description": "Selects the PEKKO actors which should receive this command",
"examples": [
"/system/sharding/connection"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ the following environment variables in order to configure the connection to the
* `MONGO_DB_CONNECTION_POOL_SIZE`: Configure MongoDB connection pool size
* `MONGO_DB_READ_PREFERENCE`: Configure MongoDB read preference
* `MONGO_DB_WRITE_CONCERN`: Configure MongoDB write concern
* `AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN`: Configure Pekko Persistence MongoDB journal write concern
* `AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN`: Configure Pekko Persistence MongoDB snapshot write concern
* `PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN`: Configure Pekko Persistence MongoDB journal write concern
* `PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN`: Configure Pekko Persistence MongoDB snapshot write concern

### Ditto configuration

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public abstract class AbstractRoute extends AllDirectives {
* Timeout for Pekko HTTP. Timeout is normally managed in HttpRequestActor and AcknowledgementAggregatorActor.
* The Pekko HTTP timeout is only there to prevent resource leak.
*/
private static final scala.concurrent.duration.Duration AKKA_HTTP_TIMEOUT =
private static final scala.concurrent.duration.Duration PEKKO_HTTP_TIMEOUT =
scala.concurrent.duration.Duration.create(2, TimeUnit.MINUTES);

private static final DittoLogger LOGGER = DittoLoggerFactory.getLogger(AbstractRoute.class);
Expand Down Expand Up @@ -373,7 +373,7 @@ private Route increaseHttpRequestTimeout(final java.util.function.Function<Durat

private Route increaseHttpRequestTimeout(final java.util.function.Function<Duration, Route> inner,
final scala.concurrent.duration.Duration requestTimeout) {
return withRequestTimeout(AKKA_HTTP_TIMEOUT,
return withRequestTimeout( PEKKO__HTTP_TIMEOUT,
() -> inner.apply(Duration.ofMillis(requestTimeout.toMillis())));
}

Expand Down
8 changes: 4 additions & 4 deletions gateway/service/src/main/resources/gateway.conf
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@ pekko {
# to be able to let ongoing HTTP requests take longer:
# must be higher than ${ditto.gateway.http.coordinated-shutdown-timeout} !
timeout = 70s
timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_SERVICE_REQUESTS_DONE_TIMEOUT}
timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_SERVICE_REQUESTS_DONE_TIMEOUT}
}
}
}
Expand All @@ -509,11 +509,11 @@ pekko {
idle-timeout = 610s # default: 60s
idle-timeout = ${?IDLE_TIMEOUT}
max-connections = 4096 # default: 1024
max-connections = ${?AKKA_HTTP_SERVER_MAX_CONNECTIONS}
max-connections = ${?PEKKO_HTTP_SERVER_MAX_CONNECTIONS}
backlog = 100 # default: 100
backlog = ${?AKKA_HTTP_SERVER_BACKLOG}
backlog = ${?PEKKO_HTTP_SERVER_BACKLOG}
raw-request-uri-header = on # default: off
raw-request-uri-header = ${?AKKA_HTTP_SERVER_RAW_REQUEST_URI_HEADER}
raw-request-uri-header = ${?PEKKO_HTTP_SERVER_RAW_REQUEST_URI_HEADER}

parsing {
max-uri-length = 8k # default: 2k
Expand Down
20 changes: 10 additions & 10 deletions internal/utils/config/src/main/resources/ditto-pekko-config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -250,11 +250,11 @@ pekko {
# The lower of this and `rebalance-relative-limit` will be used.
# only when configured >0 (which is the default), this new shard allocation strategy is used
rebalance-absolute-limit = 20
rebalance-absolute-limit = ${?AKKA_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_ABSOLUTE_LIMIT}
rebalance-absolute-limit = ${?PEKKO_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_ABSOLUTE_LIMIT}

# must be <=1.0: with 100 active shards, a relative limit of 0.2 would result to "20"
rebalance-relative-limit = 0.2
rebalance-relative-limit = ${?AKKA_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_RELATIVE_LIMIT}
rebalance-relative-limit = ${?PEKKO_CLUSTER_SHARDING_LEAST_SHARD_ALLOCATION_STRATEGY_REBALANCE_RELATIVE_LIMIT}
}
}
}
Expand All @@ -263,11 +263,11 @@ pekko {
phases {
cluster-sharding-shutdown-region {
timeout = 15s # default: 10s
timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_CLUSTER_SHARDING_SHUTDOWN_REGION}
timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_CLUSTER_SHARDING_SHUTDOWN_REGION}
}
cluster-exiting {
timeout = 15s # default: 10s
timeout = ${?AKKA_COORDINATED_SHUTDOWN_PHASES_CLUSTER_EXITING_TIMEOUT}
timeout = ${?PEKKO_COORDINATED_SHUTDOWN_PHASES_CLUSTER_EXITING_TIMEOUT}
}
}
}
Expand Down Expand Up @@ -300,18 +300,18 @@ pekko.contrib.persistence.mongodb.mongo {

# Write concerns are one of: Unacknowledged, Acknowledged, Journaled, ReplicaAcknowledged
journal-write-concern = "Acknowledged" # By default was: "Journaled"
journal-write-concern = ${?AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN}
journal-write-concern = ${?PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_CONCERN}
journal-wtimeout = 10000
journal-wtimeout = ${?AKKA_PERSISTENCE_MONGO_JOURNAL_WRITE_TIMEOUT}
journal-wtimeout = ${?PEKKO_PERSISTENCE_MONGO_JOURNAL_WRITE_TIMEOUT}
journal-fsync = false
journal-fsync = ${?AKKA_PERSISTENCE_MONGO_JOURNAL_FSYNC}
journal-fsync = ${?PEKKO_PERSISTENCE_MONGO_JOURNAL_FSYNC}

snaps-write-concern = "Acknowledged" # By default was: "Journaled"
snaps-write-concern = ${?AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN}
snaps-write-concern = ${?PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_CONCERN}
snaps-wtimeout = 5000
snaps-wtimeout = ${?AKKA_PERSISTENCE_MONGO_SNAPS_WRITE_TIMEOUT}
snaps-wtimeout = ${?PEKKO_PERSISTENCE_MONGO_SNAPS_WRITE_TIMEOUT}
snaps-fsync = false
snaps-fsync = ${?AKKA_PERSISTENCE_MONGO_SNAPS_FSYNC}
snaps-fsync = ${?PEKKO_PERSISTENCE_MONGO_SNAPS_FSYNC}

realtime-enable-persistence = false

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ public final class MongoReadJournal implements CurrentEventsByPersistenceIdQuery
*/
public static final String PRIORITY_TAG_PREFIX = "priority-";

private static final String AKKA_PERSISTENCE_JOURNAL_AUTO_START =
private static final String PEKKO_PERSISTENCE_JOURNAL_AUTO_START =
"pekko.persistence.journal.auto-start-journals";
private static final String AKKA_PERSISTENCE_SNAPS_AUTO_START =
private static final String PEKKO_PERSISTENCE_SNAPS_AUTO_START =
"pekko.persistence.snapshot-store.auto-start-snapshot-stores";

private static final String JOURNAL_COLLECTION_NAME_KEY = "overrides.journal-collection";
Expand Down Expand Up @@ -210,8 +210,8 @@ public static MongoReadJournal newInstance(final ActorSystem system) {
public static MongoReadJournal newInstance(final Config config, final DittoMongoClient mongoClient,
final ActorSystem actorSystem) {

final String autoStartJournalKey = extractAutoStartConfigKey(config, AKKA_PERSISTENCE_JOURNAL_AUTO_START);
final String autoStartSnapsKey = extractAutoStartConfigKey(config, AKKA_PERSISTENCE_SNAPS_AUTO_START);
final String autoStartJournalKey = extractAutoStartConfigKey(config, PEKKO_PERSISTENCE_JOURNAL_AUTO_START);
final String autoStartSnapsKey = extractAutoStartConfigKey(config, PEKKO_PERSISTENCE_SNAPS_AUTO_START);
final String journalCollection =
getOverrideCollectionName(config.getConfig(autoStartJournalKey), JOURNAL_COLLECTION_NAME_KEY);
final String snapshotCollection =
Expand Down Expand Up @@ -985,7 +985,7 @@ private static String extractAutoStartConfigKey(final Config config, final Strin
final List<String> autoStartJournals = config.getStringList(key);
if (autoStartJournals.size() != 1) {
final String message = String.format("Expect %s to be a singleton list, but it is List(%s)",
AKKA_PERSISTENCE_JOURNAL_AUTO_START,
PEKKO_PERSISTENCE_JOURNAL_AUTO_START,
String.join(", ", autoStartJournals));
throw new IllegalArgumentException(message);
} else {
Expand Down

0 comments on commit f0d1a62

Please sign in to comment.