Skip to main content
Version: 2.4.4

配置详情

Phoenix 配置列表

phoenix-akka配置

配置项描述类型默认值
quantex.phoenix.akka.akka-confactorSystem的配置文件路径String
quantex.phoenix.akka.service-name服务名String服务名
quantex.phoenix.akka.discovery-method集群发现的方式Enumconfig
可选值:config/kubernetes/consul
quantex.phoenix.akka.artery-canonical-port远程服务器端口Int2551
quantex.phoenix.akka.artery-canonical-hostname远程服务器地址String127.0.0.1
quantex.phoenix.akka.artery-bind-hostname可绑定的ip地址String0.0.0.0
quantex.phoenix.akka.seed-node集群的初始接触点Listakka:// + 服务名 + @127.0.0.1:2551
quantex.phoenix.akka.method服务发现的方式Stringakka-dns
quantex.phoenix.akka.pod-label-selector服务发现的pod标签Stringapp=%s
quantex.phoenix.akka.management-http-port用于集群管理的端口Int8558
quantex.phoenix.akka.management-http-bind-hostname绑定内部(0.0.0.0:8558)String0.0.0.0
quantex.phoenix.akka.k8sPodDomaink8s服务发现默认集群域名后缀Stringcluster.local
quantex.phoenix.akka.consul-hostConsul集群模式下,Consul的地址String127.0.0.1
quantex.phoenix.akka.consul-portConsul集群模式下,Consul的端口Int8500

Phoenix-server配置

配置项描述类型默认值
quantex.phoenix.server.nameServer端服务名String
quantex.phoenix.server.packageName聚合根包所在路径String
quantex.phoenix.server.dgc-enableDGC 功能开关Booleantrue
quantex.phoenix.server.entity-aggregate-enable实体聚合根开关Booleantrue
quantex.phoenix.server.transaction-aggregate-enable事务聚合根开关Booleantrue
quantex.phoenix.server.mq.typeMQ 类型Stringkafka
quantex.phoenix.server.mq.addressMQ 服务端地址String
quantex.phoenix.server.mq.propertiesMQ 通用配置,比如连接认证.map结构以key,value配置Map
quantex.phoenix.server.mq.groupServer端服务消费组名,对应kafka和rocketmq中的consumergroupStringServer端服务名
quantex.phoenix.server.mq.subscribe[].topic订阅的topicString
quantex.phoenix.server.mq.subscribe[].properties其他配置,比如ReceiverActor调优参数(#ReceiverOptimizedConfig)或者kafkaConsumer的配置map结构以key,value配置.此配置会覆盖mq.propertiesMapnull
quantex.phoenix.server.event-store.driver-class-name数据库驱动String可选值:
org.h2.Driver
com.mysql.jdbc.Driver
oracle.jdbc.OracleDriver
quantex.phoenix.server.event-store.no-eventsotre是否不需要EventStoreBooleanfalse
quantex.phoenix.server.event-store.batch-persist批量持久化 批次大小int200
quantex.phoenix.server.event-store.batch-read分页读取事件, 默认分页大小int100
quantex.phoenix.server.event-store.data-sources[].url数据库 连接urlString
quantex.phoenix.server.event-store.data-sources[].username数据库账户String
quantex.phoenix.server.event-store.data-sources[].password数据库密码String
quantex.phoenix.server.event-store.data-sources[].label数据源labelString默认 default
可选值:
default
entity
reliablity
transaction
quantex.phoenix.server.event-store.data-sources[].initial-size初始连接池大小int2
quantex.phoenix.server.event-store.data-sources[].min-idle最小连接池大小int2
quantex.phoenix.server.event-store.data-sources[].max-active最大连接池大小int8
quantex.phoenix.server.license认证license,需要向Phoenix官方申请String
quantex.phoenix.server.default-serializer默认的序列化类型String默认 protostuff
可选值:
protostuff
java
quantex.phoenix.server.performance.batch-processEntityAggregateActor 批量向子Actor发送消息进行处理Int100
quantex.phoenix.server.performance.transaction-retry-strategy重试策略(0: 重试时间会自增的策略 1: 固定重试时间的策略)Int0

Phoenix-client配置

配置项描述类型默认值
quantex.phoenix.client.enabled是否启动Booleantrue
quantex.phoenix.client.nameClient 端服务名String
quantex.phoenix.client.mq.typeMQ 类型Stringkafka
quantex.phoenix.client.mq.addressMQ 服务端地址String
quantex.phoenix.client.mq.propertiesMQ 通用配置,比如连接认证.map结构以key,value配置Map
quantex.phoenix.client.mq.topicMQ 订阅 TopicString

Phoenix EventPublish 配置

配置项描述类型默认值
quantex.phoenix.event-publish.batch-size批量大小Int128
quantex.phoenix.event-publish.buffer-queue-size缓存队列大小Int64
quantex.phoenix.event-publish.state-table-nameEventPublish状态表名称Stringevent_publish_state
quantex.phoenix.event-publish.from-begin建状态或状态不存在时,是否重置读取位置到EventStore最早时间戳Booleanfalse
quantex.phoenix.event-publish.monitor-task.enabled监控发布任务 开关Boolean
quantex.phoenix.event-publish.monitor-task.es-server监控发布任务 上报ES服务地址String
quantex.phoenix.event-publish.d-data-task.broker-server分布式数据多播任务 Kafka 服务地址String
quantex.phoenix.event-publish.d-data-task.enabled分布式数据多播任务 开关Boolean
quantex.phoenix.event-publish.d-data-task.properties分布式数据多播任务 Kafka 自定义配置Map
quantex.phoenix.event-publish.event-task.enabled领域事件发布任务 开关Boolean
quantex.phoenix.event-publish.event-task.properties领域事件发布任务 Kafka 自定义配置Map
quantex.phoenix.event-publish.event-task.topic领域事件发布任务 Kafka TopicString
quantex.phoenix.event-publish.event-task.broker-server领域事件发布任务 Kafka 服务地址String

配置样例

quantex:
phoenix:
server:
name: ${spring.application.name}
package-name: com.iquantex.phoenix
mq:
type: kafka
address: 127.0.0.1:9092
properties:
key: value
subscribe:
- topic: account
properties:
transactionReliabilityBatchRetry: 100
event-store:
driver-class-name: org.h2.Driver
data-sources:
- url: jdbc:h2:file:./data/test;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=FALSE;INIT=CREATE SCHEMA IF NOT EXISTS PUBLIC
username: sa
password:
initial-size: 0
min-idle: 0
max-active: 8
client:
name: ${spring.application.name}-client
mq:
type: kafka
address: 127.0.0.1:9092
topic: account-client
properties:
key: value
event-publish:
batch-size: 64
buffer-queue-size: 64
from-begin: true
event-task:
enabled: true
broker-server: 127.0.0.1:9092
topic: bank-account-event-pub
properties:
key: value
d-data-task:
broker-server: 127.0.0.1:9092
enabled: true
properties:
key: value
monitor-task:
enabled: true
topic: bank-account-monitor

自定义Akka配置

因为 phoenix 中的部分功能依赖于 akka,所以存在一部分 akka 相关的配置。phoenix 已经抽取了一部分常用的配置集成到 phoenix-start 中,方便用户使用。 如果想要深入自定义 Akka 相关配置,可在项目Classpath目录下创建akka.conf文件进行配置。然后修改一下配置。

quantex:
phoenix:
akka:
akka-conf: akka.conf