diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java index 250d197c8..ea5d6c3ee 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java +++ b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ConsumerConfig.java @@ -131,7 +131,7 @@ public Boolean isNearBy() { return nearBy; } - public void setNearBy(boolean nearBy) { + public void setNearBy(Boolean nearBy) { this.nearBy = nearBy; } @@ -147,7 +147,7 @@ public Boolean isPaused() { return paused; } - public void setPaused(boolean paused) { + public void setPaused(Boolean paused) { this.paused = paused; } @@ -155,7 +155,7 @@ public Boolean isArchive() { return archive; } - public void setArchive(boolean archive) { + public void setArchive(Boolean archive) { this.archive = archive; } @@ -163,7 +163,7 @@ public Boolean isRetry() { return retry; } - public void setRetry(boolean retry) { + public void setRetry(Boolean retry) { this.retry = retry; } @@ -171,7 +171,7 @@ public Integer getDelay() { return delay; } - public void setDelay(int delay) { + public void setDelay(Integer delay) { this.delay = delay; } @@ -179,7 +179,7 @@ public Integer getAckTimeout() { return ackTimeout; } - public void setAckTimeout(int ackTimeout) { + public void setAckTimeout(Integer ackTimeout) { this.ackTimeout = ackTimeout; } @@ -187,7 +187,7 @@ public Integer getBatchSize() { return batchSize; } - public void setBatchSize(int batchSize) { + public void setBatchSize(Integer batchSize) { this.batchSize = batchSize; } @@ -195,7 +195,7 @@ public Integer getMaxRetrys() { return maxRetrys; } - public void setMaxRetrys(int maxRetrys) { + public void setMaxRetrys(Integer maxRetrys) { this.maxRetrys = maxRetrys; } @@ -203,7 +203,7 @@ public Integer getMaxRetryDelay() { return maxRetryDelay; } - public void setMaxRetryDelay(int maxRetryDelay) { + public void setMaxRetryDelay(Integer maxRetryDelay) { this.maxRetryDelay = maxRetryDelay; } @@ -211,7 +211,7 @@ public Integer getRetryDelay() { return retryDelay; } - public void setRetryDelay(int retryDelay) { + public void setRetryDelay(Integer retryDelay) { this.retryDelay = retryDelay; } @@ -219,7 +219,7 @@ public Boolean isUseExponentialBackOff() { return useExponentialBackOff; } - public void setUseExponentialBackOff(boolean useExponentialBackOff) { + public void setUseExponentialBackOff(Boolean useExponentialBackOff) { this.useExponentialBackOff = useExponentialBackOff; } @@ -227,7 +227,7 @@ public Double getBackOffMultiplier() { return backOffMultiplier; } - public void setBackOffMultiplier(double backOffMultiplier) { + public void setBackOffMultiplier(Double backOffMultiplier) { this.backOffMultiplier = backOffMultiplier; } @@ -235,7 +235,7 @@ public Integer getExpireTime() { return expireTime; } - public void setExpireTime(int expireTime) { + public void setExpireTime(Integer expireTime) { this.expireTime = expireTime; } @@ -243,7 +243,7 @@ public Integer getConcurrent() { return concurrent; } - public void setConcurrent(int concurrent) { + public void setConcurrent(Integer concurrent) { this.concurrent = concurrent; } @@ -263,7 +263,7 @@ public void setFilters(String filters) { this.filters = filters; } - public void setLimitTps(int limitTps) { + public void setLimitTps(Integer limitTps) { this.limitTps = limitTps; } @@ -271,7 +271,7 @@ public Integer getLimitTps() { return limitTps; } - public void setLimitTraffic(int limitTraffic) { + public void setLimitTraffic(Integer limitTraffic) { this.limitTraffic = limitTraffic; } diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java index 59382fe9f..a50f993dc 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java +++ b/joyqueue-console/joyqueue-data/joyqueue-data-model/src/main/java/org/joyqueue/model/domain/ProducerConfig.java @@ -70,7 +70,7 @@ public Boolean isNearBy() { return nearBy; } - public void setNearBy(boolean nearBy) { + public void setNearBy(Boolean nearBy) { this.nearBy = nearBy; } @@ -86,7 +86,7 @@ public Boolean isSingle() { return single; } - public void setSingle(boolean single) { + public void setSingle(Boolean single) { this.single = single; } @@ -94,7 +94,7 @@ public Boolean isArchive() { return archive; } - public void setArchive(boolean archive) { + public void setArchive(Boolean archive) { this.archive = archive; } @@ -106,7 +106,7 @@ public void setBlackList(String blackList) { this.blackList = blackList; } - public void setLimitTps(int limitTps) { + public void setLimitTps(Integer limitTps) { this.limitTps = limitTps; } @@ -114,7 +114,7 @@ public Integer getLimitTps() { return limitTps; } - public void setLimitTraffic(int limitTraffic) { + public void setLimitTraffic(Integer limitTraffic) { this.limitTraffic = limitTraffic; } diff --git a/joyqueue-console/joyqueue-data/joyqueue-data-service/src/main/java/org/joyqueue/convert/NsrConsumerConverter.java b/joyqueue-console/joyqueue-data/joyqueue-data-service/src/main/java/org/joyqueue/convert/NsrConsumerConverter.java index 090a46b58..014e10249 100644 --- a/joyqueue-console/joyqueue-data/joyqueue-data-service/src/main/java/org/joyqueue/convert/NsrConsumerConverter.java +++ b/joyqueue-console/joyqueue-data/joyqueue-data-service/src/main/java/org/joyqueue/convert/NsrConsumerConverter.java @@ -99,7 +99,9 @@ protected Consumer backward(org.joyqueue.domain.Consumer nsrConsumer) { consumerConfig.setBlackList(StringUtils.join(consumerPolicy.getBlackList(), ",")); consumerConfig.setAckTimeout(consumerPolicy.getAckTimeout()); consumerConfig.setArchive(consumerPolicy.getArchive()); - consumerConfig.setBatchSize(consumerPolicy.getBatchSize()); + if (consumerPolicy.getBatchSize() != null) { + consumerConfig.setBatchSize(Integer.parseInt(consumerPolicy.getBatchSize().toString())); + } consumerConfig.setConcurrent(consumerPolicy.getConcurrent()); consumerConfig.setDelay(consumerPolicy.getDelay()); consumerConfig.setPaused(consumerPolicy.getPaused());