Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Apache RocketMQ
Rocketmq
提交
1706cecf
R
Rocketmq
项目概览
Apache RocketMQ
/
Rocketmq
上一次同步 大约 3 年
通知
270
Star
16139
Fork
68
代码
文件
提交
分支
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看板
未验证
提交
1706cecf
编写于
4月 16, 2020
作者:
RocketMQ技术号
提交者:
GitHub
4月 16, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1941 from ifplusor/fixed-typo-in-RequestResponseFuture
Fixed typo in RequestResponseFuture.
上级
dd822ae5
78b6d7b5
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
14 addition
and
14 deletion
+14
-14
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
.../rocketmq/client/impl/producer/DefaultMQProducerImpl.java
+10
-10
client/src/main/java/org/apache/rocketmq/client/producer/RequestResponseFuture.java
...pache/rocketmq/client/producer/RequestResponseFuture.java
+2
-2
client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java
...pache/rocketmq/client/producer/DefaultMQProducerTest.java
+1
-1
client/src/test/java/org/apache/rocketmq/client/producer/RequestResponseFutureTest.java
...e/rocketmq/client/producer/RequestResponseFutureTest.java
+1
-1
未找到文件。
client/src/main/java/org/apache/rocketmq/client/impl/producer/DefaultMQProducerImpl.java
浏览文件 @
1706cecf
...
...
@@ -1356,12 +1356,12 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this
.
sendDefaultImpl
(
msg
,
CommunicationMode
.
ASYNC
,
new
SendCallback
()
{
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
true
);
requestResponseFuture
.
setSendReq
ue
stOk
(
true
);
}
@Override
public
void
onException
(
Throwable
e
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
false
);
requestResponseFuture
.
setSendReq
ue
stOk
(
false
);
requestResponseFuture
.
putResponseMessage
(
null
);
requestResponseFuture
.
setCause
(
e
);
}
...
...
@@ -1386,7 +1386,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this
.
sendDefaultImpl
(
msg
,
CommunicationMode
.
ASYNC
,
new
SendCallback
()
{
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
true
);
requestResponseFuture
.
setSendReq
ue
stOk
(
true
);
}
@Override
...
...
@@ -1412,12 +1412,12 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this
.
sendSelectImpl
(
msg
,
selector
,
arg
,
CommunicationMode
.
ASYNC
,
new
SendCallback
()
{
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
true
);
requestResponseFuture
.
setSendReq
ue
stOk
(
true
);
}
@Override
public
void
onException
(
Throwable
e
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
false
);
requestResponseFuture
.
setSendReq
ue
stOk
(
false
);
requestResponseFuture
.
putResponseMessage
(
null
);
requestResponseFuture
.
setCause
(
e
);
}
...
...
@@ -1443,7 +1443,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this
.
sendSelectImpl
(
msg
,
selector
,
arg
,
CommunicationMode
.
ASYNC
,
new
SendCallback
()
{
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
true
);
requestResponseFuture
.
setSendReq
ue
stOk
(
true
);
}
@Override
...
...
@@ -1469,12 +1469,12 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this
.
sendKernelImpl
(
msg
,
mq
,
CommunicationMode
.
ASYNC
,
new
SendCallback
()
{
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
true
);
requestResponseFuture
.
setSendReq
ue
stOk
(
true
);
}
@Override
public
void
onException
(
Throwable
e
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
false
);
requestResponseFuture
.
setSendReq
ue
stOk
(
false
);
requestResponseFuture
.
putResponseMessage
(
null
);
requestResponseFuture
.
setCause
(
e
);
}
...
...
@@ -1512,7 +1512,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
this
.
sendKernelImpl
(
msg
,
mq
,
CommunicationMode
.
ASYNC
,
new
SendCallback
()
{
@Override
public
void
onSuccess
(
SendResult
sendResult
)
{
requestResponseFuture
.
setSendReq
eu
stOk
(
true
);
requestResponseFuture
.
setSendReq
ue
stOk
(
true
);
}
@Override
...
...
@@ -1526,7 +1526,7 @@ public class DefaultMQProducerImpl implements MQProducerInner {
private
void
requestFail
(
final
String
correlationId
)
{
RequestResponseFuture
responseFuture
=
RequestFutureTable
.
getRequestFutureTable
().
remove
(
correlationId
);
if
(
responseFuture
!=
null
)
{
responseFuture
.
setSendReq
eu
stOk
(
false
);
responseFuture
.
setSendReq
ue
stOk
(
false
);
responseFuture
.
putResponseMessage
(
null
);
try
{
responseFuture
.
executeRequestCallback
();
...
...
client/src/main/java/org/apache/rocketmq/client/producer/RequestResponseFuture.java
浏览文件 @
1706cecf
...
...
@@ -103,8 +103,8 @@ public class RequestResponseFuture {
return
sendRequestOk
;
}
public
void
setSendReq
eustOk
(
boolean
sendReqeu
stOk
)
{
this
.
sendRequestOk
=
sendReq
eu
stOk
;
public
void
setSendReq
uestOk
(
boolean
sendReque
stOk
)
{
this
.
sendRequestOk
=
sendReq
ue
stOk
;
}
public
Message
getRequestMsg
()
{
...
...
client/src/test/java/org/apache/rocketmq/client/producer/DefaultMQProducerTest.java
浏览文件 @
1706cecf
...
...
@@ -373,7 +373,7 @@ public class DefaultMQProducerTest {
assertThat
(
responseMap
).
isNotNull
();
for
(
Map
.
Entry
<
String
,
RequestResponseFuture
>
entry
:
responseMap
.
entrySet
())
{
RequestResponseFuture
future
=
entry
.
getValue
();
future
.
setSendReq
eu
stOk
(
true
);
future
.
setSendReq
ue
stOk
(
true
);
message
.
setFlag
(
1
);
future
.
getRequestCallback
().
onSuccess
(
message
);
}
...
...
client/src/test/java/org/apache/rocketmq/client/producer/RequestResponseFutureTest.java
浏览文件 @
1706cecf
...
...
@@ -37,7 +37,7 @@ public class RequestResponseFutureTest {
@Override
public
void
onException
(
Throwable
e
)
{
}
});
future
.
setSendReq
eu
stOk
(
true
);
future
.
setSendReq
ue
stOk
(
true
);
future
.
executeRequestCallback
();
assertThat
(
cc
.
get
()).
isEqualTo
(
1
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录