Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Kwan的解忧杂货铺@新空间代码工作室
Rocketmq
提交
c8ee3289
R
Rocketmq
项目概览
Kwan的解忧杂货铺@新空间代码工作室
/
Rocketmq
与 Fork 源项目一致
Fork自
Apache RocketMQ / Rocketmq
通知
1
Star
0
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看板
提交
c8ee3289
编写于
12月 28, 2016
作者:
Y
yukon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ROCKETMQ-18 Remove bad practices in client.
上级
9165667a
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
14 addition
and
15 deletion
+14
-15
client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java
...pache/rocketmq/client/consumer/DefaultMQPullConsumer.java
+1
-0
client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java
...pache/rocketmq/client/consumer/DefaultMQPushConsumer.java
+1
-0
client/src/main/java/org/apache/rocketmq/client/consumer/PullCallback.java
...ava/org/apache/rocketmq/client/consumer/PullCallback.java
+2
-2
client/src/main/java/org/apache/rocketmq/client/consumer/PullTaskCallback.java
...org/apache/rocketmq/client/consumer/PullTaskCallback.java
+1
-1
client/src/main/java/org/apache/rocketmq/client/consumer/listener/ConsumeReturnType.java
.../rocketmq/client/consumer/listener/ConsumeReturnType.java
+0
-3
client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByMachineRoom.java
...consumer/rebalance/AllocateMessageQueueByMachineRoom.java
+4
-4
client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java
...cketmq/client/consumer/store/RemoteBrokerOffsetStore.java
+1
-1
client/src/main/java/org/apache/rocketmq/client/hook/CheckForbiddenHook.java
...a/org/apache/rocketmq/client/hook/CheckForbiddenHook.java
+2
-2
client/src/main/java/org/apache/rocketmq/client/hook/FilterMessageHook.java
...va/org/apache/rocketmq/client/hook/FilterMessageHook.java
+2
-2
未找到文件。
client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPullConsumer.java
浏览文件 @
c8ee3289
...
...
@@ -335,6 +335,7 @@ public class DefaultMQPullConsumer extends ClientConfig implements MQPullConsume
MessageDecoder
.
decodeMessageId
(
uniqKey
);
return
this
.
viewMessage
(
uniqKey
);
}
catch
(
Exception
e
)
{
// Ignore
}
return
this
.
defaultMQPullConsumerImpl
.
queryMessageByUniqKey
(
topic
,
uniqKey
);
}
...
...
client/src/main/java/org/apache/rocketmq/client/consumer/DefaultMQPushConsumer.java
浏览文件 @
c8ee3289
...
...
@@ -210,6 +210,7 @@ public class DefaultMQPushConsumer extends ClientConfig implements MQPushConsume
MessageDecoder
.
decodeMessageId
(
msgId
);
return
this
.
viewMessage
(
msgId
);
}
catch
(
Exception
e
)
{
// Ignore
}
return
this
.
defaultMQPushConsumerImpl
.
queryMessageByUniqKey
(
topic
,
msgId
);
}
...
...
client/src/main/java/org/apache/rocketmq/client/consumer/PullCallback.java
浏览文件 @
c8ee3289
...
...
@@ -22,7 +22,7 @@ package org.apache.rocketmq.client.consumer;
* @author vintagewang@apache.org
*/
public
interface
PullCallback
{
public
void
onSuccess
(
final
PullResult
pullResult
);
void
onSuccess
(
final
PullResult
pullResult
);
public
void
onException
(
final
Throwable
e
);
void
onException
(
final
Throwable
e
);
}
client/src/main/java/org/apache/rocketmq/client/consumer/PullTaskCallback.java
浏览文件 @
c8ee3289
...
...
@@ -20,5 +20,5 @@ import org.apache.rocketmq.common.message.MessageQueue;
public
interface
PullTaskCallback
{
public
void
doPullTask
(
final
MessageQueue
mq
,
final
PullTaskContext
context
);
void
doPullTask
(
final
MessageQueue
mq
,
final
PullTaskContext
context
);
}
client/src/main/java/org/apache/rocketmq/client/consumer/listener/ConsumeReturnType.java
浏览文件 @
c8ee3289
...
...
@@ -17,9 +17,6 @@
package
org.apache.rocketmq.client.consumer.listener
;
/**
* Created by alvin on 16-11-30.
*/
public
enum
ConsumeReturnType
{
/**
* consume return success
...
...
client/src/main/java/org/apache/rocketmq/client/consumer/rebalance/AllocateMessageQueueByMachineRoom.java
浏览文件 @
c8ee3289
...
...
@@ -45,12 +45,12 @@ public class AllocateMessageQueueByMachineRoom implements AllocateMessageQueueSt
premqAll
.
add
(
mq
);
}
}
// Todo cid
int
mod
=
premqAll
.
size
()
/
cidAll
.
size
();
int
rem
=
premqAll
.
size
()
%
cidAll
.
size
();
int
start
i
ndex
=
mod
*
currentIndex
;
int
end
index
=
starti
ndex
+
mod
;
for
(
int
i
=
start
index
;
i
<
endi
ndex
;
i
++)
{
int
start
I
ndex
=
mod
*
currentIndex
;
int
end
Index
=
startI
ndex
+
mod
;
for
(
int
i
=
start
Index
;
i
<
endI
ndex
;
i
++)
{
result
.
add
(
mqAll
.
get
(
i
));
}
if
(
rem
>
currentIndex
)
{
...
...
client/src/main/java/org/apache/rocketmq/client/consumer/store/RemoteBrokerOffsetStore.java
浏览文件 @
c8ee3289
...
...
@@ -125,7 +125,7 @@ public class RemoteBrokerOffsetStore implements OffsetStore {
return
;
final
HashSet
<
MessageQueue
>
unusedMQ
=
new
HashSet
<
MessageQueue
>();
if
(
mqs
!=
null
&&
!
mqs
.
isEmpty
())
{
if
(!
mqs
.
isEmpty
())
{
for
(
Map
.
Entry
<
MessageQueue
,
AtomicLong
>
entry
:
this
.
offsetTable
.
entrySet
())
{
MessageQueue
mq
=
entry
.
getKey
();
AtomicLong
offset
=
entry
.
getValue
();
...
...
client/src/main/java/org/apache/rocketmq/client/hook/CheckForbiddenHook.java
浏览文件 @
c8ee3289
...
...
@@ -24,8 +24,8 @@ import org.apache.rocketmq.client.exception.MQClientException;
* @author manhong.yqd
*/
public
interface
CheckForbiddenHook
{
public
String
hookName
();
String
hookName
();
public
void
checkForbidden
(
final
CheckForbiddenContext
context
)
throws
MQClientException
;
void
checkForbidden
(
final
CheckForbiddenContext
context
)
throws
MQClientException
;
}
client/src/main/java/org/apache/rocketmq/client/hook/FilterMessageHook.java
浏览文件 @
c8ee3289
...
...
@@ -20,8 +20,8 @@ package org.apache.rocketmq.client.hook;
* @author manhong.yqd
*/
public
interface
FilterMessageHook
{
public
String
hookName
();
String
hookName
();
public
void
filterMessage
(
final
FilterMessageContext
context
);
void
filterMessage
(
final
FilterMessageContext
context
);
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录