Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RIP-10] Add test case for ConsumeMessageOrderlyService #905

Closed
wants to merge 93 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
e204376
polish filter example
RongtongJin Dec 22, 2018
06fbe7b
更新了ch08-operation
chuenfaiy Jan 3, 2019
7b37381
修改了文件名称为运维管理
chuenfaiy Jan 3, 2019
91c82df
修改了文件名称为operation
chuenfaiy Jan 3, 2019
3b9e8af
修改了表格代码
chuenfaiy Jan 3, 2019
8c317f3
修改了表格代码
chuenfaiy Jan 3, 2019
d13bf6c
修改了表格代码
chuenfaiy Jan 3, 2019
27661e5
修改了表格代码
chuenfaiy Jan 3, 2019
bf679ab
修改了表格代码
chuenfaiy Jan 3, 2019
198400d
修改了表格代码
chuenfaiy Jan 3, 2019
9d0e429
1. Simple Example
yejunyu Jan 3, 2019
71fcc07
Modified some typos
yejunyu Jan 4, 2019
45a78ae
modify architecture.md
Jan 5, 2019
d0b0fa9
modify test case,cover FlushRealTimeService
Jan 8, 2019
837ccc1
修改了operation标题格式
chuenfaiy Jan 8, 2019
acb98ec
unuseful blank
yejunyu Jan 16, 2019
b52738c
[maven-release-plugin] prepare for next development iteration
duhenglucky Jan 17, 2019
07ac443
1. Optimized formatting and indentation
yejunyu Jan 21, 2019
146fc43
1. indentation
yejunyu Jan 21, 2019
5595fe3
delete unit test releated file
Jan 21, 2019
68aa58d
recover unit test file
Jan 21, 2019
035eb55
correct some edit-errors.
chuenfaiy Jan 23, 2019
39ebc5e
some edit errors is corrected.
chuenfaiy Jan 24, 2019
50e7d39
some edit errors is corrected.
chuenfaiy Jan 24, 2019
a7b0c27
[RIP-9]add the msg trace and acl feature content of RocketMQ doc part…
zongtanghu Jan 24, 2019
11f6edd
Merge pull request #620 from RongtongJin/polish_filter_example
duhenglucky Jan 24, 2019
649ad4a
[RIP-9]adjust the formate of RocketMQ acl doc part.
zongtanghu Jan 24, 2019
cc1a4bc
[RIP-9]Modify the architecture part Develop
ShannonDing Jan 24, 2019
168c68b
1. Modified the format
yejunyu Jan 24, 2019
a7e70fb
[RIP-9]Adjust the formate of RocketMQ ACL doc part.
ShannonDing Jan 24, 2019
030f432
Add the best practice of RocketMQ
wlliqipeng Jan 25, 2019
66e2358
Modify the format of the title
wlliqipeng Jan 25, 2019
077e5d0
[RIP-9]Add the operation part
ShannonDing Jan 25, 2019
e67e3db
[RIP-9] Add the simple example description
ShannonDing Jan 25, 2019
91e27a6
Update best_practice.md
ShannonDing Jan 25, 2019
a8b430d
[RIP-9]Add the best practice of RocketMQ
ShannonDing Jan 25, 2019
d9e5029
Add ACL and Message trace feature in README file.
ShannonDing Jan 25, 2019
4d966b4
[ISSUE #731] Change log level in TransactionalMessageServiceImpl
Jan 31, 2019
02d2382
RIP-9 RocketMQ Develop Guide: add description section for broker conf…
harrycodawang Feb 2, 2019
bac3594
Revise section format and reword some sentences for broker configurat…
harrycodawang Feb 11, 2019
dd9e9fd
Revise some title format
harrycodawang Feb 11, 2019
86ceb1d
[RIP-9] RocketMQ Develop Guide: enhance description section for broke…
ShannonDing Feb 12, 2019
9745071
[RIP-9]Add the features of RocketMQ into the develop guide for users …
yangweibing Feb 15, 2019
f2df910
[RIP-9]add the design content of RocketMQ doc part. (#732)
zhangjidi2016 Feb 15, 2019
6a573a7
[RIP-9] Add the introduction of the basic samples in RocketMQ (#758)
frayds Feb 15, 2019
5b47023
[RIP-9] Added sample English documents of English transaction messages
chenhaoxiang Feb 16, 2019
fb48f4d
add en doc of Operation FAQ
husterxsp Feb 16, 2019
1c36c99
[issue#790]fix defaultTopicPerm and defaultGroupPerm values which are…
zongtanghu Feb 18, 2019
deaece5
[RIP-9] Add a delay example in RocketMQ
ThailandKing Feb 18, 2019
e01b5ae
Merge pull request #781 from chenhaoxiang/develop
duhenglucky Feb 19, 2019
971eb9d
[RIP-9] Add the introduction of the batch message samples in RocketMQ…
Feb 19, 2019
132d0ae
[RIP-9]Add the English docs for Filter Example of RocketMQ into the d…
yewenchen Feb 19, 2019
6c17951
[RIP-9] Add the English description document for Deployment.md (#780)
SeekerWu667 Feb 20, 2019
95db64d
[RIP-10] Add test cases for DefaultMessageStore.putMessages (#777)
odbozhou Feb 20, 2019
1128a5a
[RIP-10]Add test cases for DefaultMessageStore which methods read fro…
wnow20 Feb 20, 2019
8357b44
[RIP-10] Add test cases of ScheduleMessageService (#782)
ranqiqiang Feb 20, 2019
13b5dd1
[RIP-10] Optimize test batch send message use cases(#831)
odbozhou Feb 21, 2019
82634b8
Change the first character to upper case.
ShannonDing Feb 21, 2019
6f322c4
[issue#789]fix NullPointerException in the PlainAccessValidator#parse…
zongtanghu Feb 21, 2019
760bc3a
[RIP-9] Add en doc of Operation FAQ (#784)
ShannonDing Feb 21, 2019
caec839
[RIP-9] Add the introduction of the access control list in RocketMQ (…
yuzhiping Feb 21, 2019
5dc64d0
[RIP-9]To add English version of Examples of Ordered Messages in docs…
eagle101113 Feb 21, 2019
ffd2696
[RIP-9]Add English docs of transactional message design (#804)
Feb 21, 2019
648cac3
[RIP-9] Add english document of storage design(#809)
vonzhou Feb 21, 2019
698effa
[RIP-10] Add test cases for CheckClientRequestBody (#808)
jackxu2011 Feb 21, 2019
39406a3
[RIP-10] Add test case for ConsumeStatsList (#814)
dengtongcai Feb 21, 2019
d2fba24
[ISSUE #776] make mqadmin usage information more friendly to user(#796)
husterxsp Feb 21, 2019
0623c6f
[RIP-10] Add ClusterInfo testing case (#830)
wangjuneng Feb 21, 2019
5e05b14
[RIP-10] Add test cases for TopicStatsTable.java (#832)
radishlee Feb 21, 2019
cbba3f6
[RIP-10] Fix junit bug in ScheduleMessageServiceTest (#839)
ranqiqiang Feb 21, 2019
6bece12
[RIP-10]Add test case for CommitLog.handleHA (#829)
a51764579 Feb 22, 2019
ee08826
[RIP-10] Add test case for KVTable (#828)
woshihoujinxin Feb 22, 2019
a9b6939
[RIP-10] Add test cases for DefaultMessageStore.CleanCommitLogServic…
NeoOU Feb 22, 2019
3aaaba8
[RIP-9] Add the introduction of the Operations_Producer in RocketMQ (…
frayds Feb 22, 2019
580037f
Merge pull request #742 from Aaron-He/develop
duhenglucky Feb 22, 2019
77e3c23
[RIP-9] Add Operations_Trace.md in rocketmq (#859)
GentleNi Feb 25, 2019
1dd9f16
[RIP-9] Add the introduction of the basic concepts in RocketMQ (#793)
TJH54 Feb 25, 2019
ac62ce9
[RIP-9]Add the client configuration section of the RocketMQ documenta…
Byron4j Feb 25, 2019
8d04250
[RIP-9]Add English docs of architecture (#812)
startlu Feb 25, 2019
e4bbcc8
[RIP-9] Add the Configuration_System in RocketMQ (#885)
liuyingjie-asir Feb 25, 2019
fc037bb
[RIP-9] Add ta CLITools.md file to illustrate the use of mqadmin man…
SeekerWu667 Feb 25, 2019
2e55ffb
[RIP-9] Add API_Reference_DefaultMQProducer.md for Java (#837)
Childe-Chen Feb 25, 2019
3041c82
[RIP-9] Commit docs Design_Filter.md (#840)
xiaoyaofawai Feb 25, 2019
cfceb1f
[RIP-9] Change the Chinese punctuation in Example_Delay.md to English…
xiaoxinglai Feb 25, 2019
d1f2f2d
[RIP-9] update the en doc for Troubleshoopting.md #881 (#883)
yangl Feb 25, 2019
90e0c4b
[RIP-9] Add the FAQ in RocketMQ (#879)
naah69 Feb 25, 2019
06ea92b
[RIP-9] Delete the number on the title (#887)
sigmoid712 Feb 25, 2019
175dc21
[RIP-9] Update incorrect symbol (#886)
hansongChina Feb 25, 2019
79361b8
[RIP-9] enhance description about the state "SLAVE_NOT_AVAILABLE" in …
312223105 Feb 26, 2019
fe49193
[RIP-9]Polish Best practice.md (#890)
a337928 Feb 26, 2019
e12dde5
[RIP-9] Modify the wrong architecture diagram. (#891)
Feb 26, 2019
6eff504
[RIP-9]Change the project number to a solid black dot (#893)
888tyhj Feb 26, 2019
4527b84
[RIP-10] Add test case for ConsumeMessageOrderlyService
Feb 26, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ It offers a variety of features:
* Various message filter mechanics such as SQL and Tag
* Docker images for isolated testing and cloud isolated clusters
* Feature-rich administrative dashboard for configuration, metrics and monitoring
* Access control list
* Message trace


----------
Expand Down
2 changes: 1 addition & 1 deletion acl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-all</artifactId>
<version>4.4.0</version>
<version>4.4.1-SNAPSHOT</version>
</parent>
<artifactId>rocketmq-acl</artifactId>
<name>rocketmq-acl ${project.version}</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public AccessResource parse(RemotingCommand request, String remoteAddr) {
} else {
accessResource.setWhiteRemoteAddress(remoteAddr);
}

if (request.getExtFields() == null) {
throw new AclException("request's extFields value is null");
}

accessResource.setRequestCode(request.getCode());
accessResource.setAccessKey(request.getExtFields().get(SessionCredentials.ACCESS_KEY));
accessResource.setSignature(request.getExtFields().get(SessionCredentials.SIGNATURE));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ void checkPerm(PlainAccessResource needCheckedAccess, PlainAccessResource ownedA

if (!ownedPermMap.containsKey(resource)) {
// Check the default perm
byte ownedPerm = isGroup ? needCheckedAccess.getDefaultGroupPerm() :
needCheckedAccess.getDefaultTopicPerm();
byte ownedPerm = isGroup ? ownedAccess.getDefaultGroupPerm() :
ownedAccess.getDefaultTopicPerm();
if (!Permission.checkPermission(neededPerm, ownedPerm)) {
throw new AclException(String.format("No default permission for %s", PlainAccessResource.printStr(resource, isGroup)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class PlainAccessValidatorTest {
@Before
public void init() {
System.setProperty("rocketmq.home.dir", "src/test/resources");
System.setProperty("rocketmq.acl.plain.file", "/conf/plain_acl.yml");
plainAccessValidator = new PlainAccessValidator();
sessionCredentials = new SessionCredentials();
sessionCredentials.setAccessKey("RocketMQ");
Expand Down Expand Up @@ -115,6 +116,22 @@ public void validateSendMessageV2Test() {
plainAccessValidator.validate(accessResource);
}

@Test(expected = AclException.class)
public void validateForAdminCommandWithOutAclRPCHook() {
RemotingCommand consumerOffsetAdminRequest = RemotingCommand.createRequestCommand(RequestCode.GET_ALL_CONSUMER_OFFSET, null);
plainAccessValidator.parse(consumerOffsetAdminRequest, "192.168.0.1:9876");

RemotingCommand subscriptionGroupAdminRequest = RemotingCommand.createRequestCommand(RequestCode.GET_ALL_SUBSCRIPTIONGROUP_CONFIG, null);
plainAccessValidator.parse(subscriptionGroupAdminRequest, "192.168.0.1:9876");

RemotingCommand delayOffsetAdminRequest = RemotingCommand.createRequestCommand(RequestCode.GET_ALL_DELAY_OFFSET, null);
plainAccessValidator.parse(delayOffsetAdminRequest, "192.168.0.1:9876");

RemotingCommand allTopicConfigAdminRequest = RemotingCommand.createRequestCommand(RequestCode.GET_ALL_TOPIC_CONFIG, null);
plainAccessValidator.parse(allTopicConfigAdminRequest, "192.168.0.1:9876");

}

@Test
public void validatePullMessageTest() {
PullMessageRequestHeader pullMessageRequestHeader=new PullMessageRequestHeader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ public void checkPerm() {

}
@Test(expected = AclException.class)
public void checkErrorPerm() {
public void checkErrorPermDefaultValueNotMatch() {

plainAccessResource = new PlainAccessResource();
plainAccessResource.addResourceAndPerm("topicF", Permission.SUB);
plainAccessResource.addResourceAndPerm("topicF", Permission.PUB);
plainPermissionLoader.checkPerm(plainAccessResource, SUBPlainAccessResource);
}
@Test(expected = AclException.class)
Expand Down
2 changes: 1 addition & 1 deletion broker/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-all</artifactId>
<version>4.4.0</version>
<version>4.4.1-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ private boolean putBackHalfMsgQueue(MessageExt msgExt, long offset) {
msgExt.setCommitLogOffset(
putMessageResult.getAppendMessageResult().getWroteOffset());
msgExt.setMsgId(putMessageResult.getAppendMessageResult().getMsgId());
log.info(
log.debug(
"Send check message, the offset={} restored in queueOffset={} "
+ "commitLogOffset={} "
+ "newMsgId={} realMsgId={} topic={}",
Expand All @@ -127,7 +127,7 @@ public void check(long transactionTimeout, int transactionCheckMax,
log.warn("The queue of topic is empty :" + topic);
return;
}
log.info("Check topic={}, queues={}", topic, msgQueues);
log.debug("Check topic={}, queues={}", topic, msgQueues);
for (MessageQueue messageQueue : msgQueues) {
long startTime = System.currentTimeMillis();
MessageQueue opQueue = getOpQueue(messageQueue);
Expand Down Expand Up @@ -168,7 +168,7 @@ public void check(long transactionTimeout, int transactionCheckMax,
break;
}
if (getResult.getPullResult().getPullStatus() == PullStatus.NO_NEW_MSG) {
log.info("No new msg, the miss offset={} in={}, continue check={}, pull result={}", i,
log.debug("No new msg, the miss offset={} in={}, continue check={}, pull result={}", i,
messageQueue, getMessageNullCount, getResult.getPullResult());
break;
} else {
Expand All @@ -187,7 +187,7 @@ public void check(long transactionTimeout, int transactionCheckMax,
continue;
}
if (msgExt.getStoreTimestamp() >= startTime) {
log.info("Fresh stored. the miss offset={}, check it later, store={}", i,
log.debug("Fresh stored. the miss offset={}, check it later, store={}", i,
new Date(msgExt.getStoreTimestamp()));
break;
}
Expand All @@ -206,7 +206,7 @@ public void check(long transactionTimeout, int transactionCheckMax,
}
} else {
if ((0 <= valueOfCurrentMinusBorn) && (valueOfCurrentMinusBorn < checkImmunityTime)) {
log.info("New arrived, the miss offset={}, check it later checkImmunity={}, born={}", i,
log.debug("New arrived, the miss offset={}, check it later checkImmunity={}, born={}", i,
checkImmunityTime, new Date(msgExt.getBornTimestamp()));
break;
}
Expand Down
2 changes: 1 addition & 1 deletion client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.apache.rocketmq</groupId>
<artifactId>rocketmq-all</artifactId>
<version>4.4.0</version>
<version>4.4.1-SNAPSHOT</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down