Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
s920243400
Rocketmq
提交
30ad1723
R
Rocketmq
项目概览
s920243400
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
Rocketmq
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
未验证
提交
30ad1723
编写于
3月 30, 2020
作者:
X
xujianhai666
提交者:
GitHub
3月 30, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[ISSUE #1741] Rename takeMessags to takeMessages
Closes #1741
上级
189c6e30
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java
...mq/client/impl/consumer/ConsumeMessageOrderlyService.java
+1
-1
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java
...rg/apache/rocketmq/client/impl/consumer/ProcessQueue.java
+1
-1
client/src/test/java/org/apache/rocketmq/client/impl/consumer/ProcessQueueTest.java
...pache/rocketmq/client/impl/consumer/ProcessQueueTest.java
+5
-5
未找到文件。
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ConsumeMessageOrderlyService.java
浏览文件 @
30ad1723
...
...
@@ -452,7 +452,7 @@ public class ConsumeMessageOrderlyService implements ConsumeMessageService {
final
int
consumeBatchSize
=
ConsumeMessageOrderlyService
.
this
.
defaultMQPushConsumer
.
getConsumeMessageBatchMaxSize
();
List
<
MessageExt
>
msgs
=
this
.
processQueue
.
takeMessags
(
consumeBatchSize
);
List
<
MessageExt
>
msgs
=
this
.
processQueue
.
takeMessag
e
s
(
consumeBatchSize
);
defaultMQPushConsumerImpl
.
resetRetryAndNamespace
(
msgs
,
defaultMQPushConsumer
.
getConsumerGroup
());
if
(!
msgs
.
isEmpty
())
{
final
ConsumeOrderlyContext
context
=
new
ConsumeOrderlyContext
(
this
.
messageQueue
);
...
...
client/src/main/java/org/apache/rocketmq/client/impl/consumer/ProcessQueue.java
浏览文件 @
30ad1723
...
...
@@ -296,7 +296,7 @@ public class ProcessQueue {
}
}
public
List
<
MessageExt
>
takeMessags
(
final
int
batchSize
)
{
public
List
<
MessageExt
>
takeMessag
e
s
(
final
int
batchSize
)
{
List
<
MessageExt
>
result
=
new
ArrayList
<
MessageExt
>(
batchSize
);
final
long
now
=
System
.
currentTimeMillis
();
try
{
...
...
client/src/test/java/org/apache/rocketmq/client/impl/consumer/ProcessQueueTest.java
浏览文件 @
30ad1723
...
...
@@ -38,7 +38,7 @@ public class ProcessQueueTest {
assertThat
(
pq
.
getMsgCount
().
get
()).
isEqualTo
(
100
);
pq
.
takeMessags
(
10
);
pq
.
takeMessag
e
s
(
10
);
pq
.
commit
();
assertThat
(
pq
.
getMsgCount
().
get
()).
isEqualTo
(
90
);
...
...
@@ -55,7 +55,7 @@ public class ProcessQueueTest {
assertThat
(
pq
.
getMsgSize
().
get
()).
isEqualTo
(
100
*
123
);
pq
.
takeMessags
(
10
);
pq
.
takeMessag
e
s
(
10
);
pq
.
commit
();
assertThat
(
pq
.
getMsgSize
().
get
()).
isEqualTo
(
90
*
123
);
...
...
@@ -74,17 +74,17 @@ public class ProcessQueueTest {
assertThat
(
processQueueInfo
.
getCachedMsgSizeInMiB
()).
isEqualTo
(
12
);
pq
.
takeMessags
(
10000
);
pq
.
takeMessag
e
s
(
10000
);
pq
.
commit
();
pq
.
fillProcessQueueInfo
(
processQueueInfo
);
assertThat
(
processQueueInfo
.
getCachedMsgSizeInMiB
()).
isEqualTo
(
10
);
pq
.
takeMessags
(
10000
);
pq
.
takeMessag
e
s
(
10000
);
pq
.
commit
();
pq
.
fillProcessQueueInfo
(
processQueueInfo
);
assertThat
(
processQueueInfo
.
getCachedMsgSizeInMiB
()).
isEqualTo
(
9
);
pq
.
takeMessags
(
80000
);
pq
.
takeMessag
e
s
(
80000
);
pq
.
commit
();
pq
.
fillProcessQueueInfo
(
processQueueInfo
);
assertThat
(
processQueueInfo
.
getCachedMsgSizeInMiB
()).
isEqualTo
(
0
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录