Skip to content

Commit

Permalink
生产者/消费者配置添加默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
iamazy committed Oct 15, 2020
1 parent 552b774 commit 1d2a271
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,17 @@ public class ConsumerConfig extends BaseNsrModel {
/**
* 开启就近机房消费
**/
private Boolean nearBy;
private Boolean nearBy = false;

/**
* 是否暂停消费
**/
private Boolean paused;
private Boolean paused = false;

/**
* 是否需要归档,默认不归档
**/
private Boolean archive;
private Boolean archive = false;

/**
* 是否启用重试服务,默认开启
Expand Down Expand Up @@ -75,19 +75,19 @@ public class ConsumerConfig extends BaseNsrModel {
* 最大重试次数(无限制)
**/
@Min(0)
private Integer maxRetrys;
private Integer maxRetrys = 0;

/**
* 最大重试间隔(默认5分钟)
**/
@Min(0)
private Integer maxRetryDelay;
private Integer maxRetryDelay = 0;

/**
* 重试间隔
*/
@Min(0)
private Integer retryDelay;
private Integer retryDelay = 0;

private String region;

Expand All @@ -100,13 +100,13 @@ public class ConsumerConfig extends BaseNsrModel {
* 指数系数
*/
@Min(0)
private Double backOffMultiplier;
private Double backOffMultiplier = 0D;

/**
* 过期时间(默认3天)
**/
@Min(0)
private Integer expireTime;
private Integer expireTime = 0;

/**
* 单队列并行度
Expand All @@ -120,9 +120,9 @@ public class ConsumerConfig extends BaseNsrModel {

private String filters;

private Integer limitTps;
private Integer limitTps = 0;

private Integer limitTraffic;
private Integer limitTraffic = 0;

private Map<String, String> params;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ProducerConfig extends BaseNsrModel {
/**
* 是否就近发送
**/
private Boolean nearBy;
private Boolean nearBy = false;

/**
* 集群实例发送权重
Expand All @@ -38,7 +38,7 @@ public class ProducerConfig extends BaseNsrModel {
/**
* 是否归档
*/
private Boolean archive;
private Boolean archive = false;

/**
* 单个发送者
Expand All @@ -47,11 +47,11 @@ public class ProducerConfig extends BaseNsrModel {

private String blackList;

private Integer limitTps;
private Integer limitTps = 0;

private Integer limitTraffic;
private Integer limitTraffic = 0;

private Integer timeout;
private Integer timeout = 2000;

private Integer qosLevel;
private String region;
Expand Down

0 comments on commit 1d2a271

Please sign in to comment.