Skip to content

Conversation

@ShannonDing
Copy link
Member

@ShannonDing ShannonDing commented Apr 15, 2019

What is the purpose of the change

[ISSUE #121 ]Support connect MQ endpoint

Brief changelog

Change the signature context for send message
Support Aliyun MQ endpoint URL parser
Add function and line in the log file

Verifying this change

Two kinds of Aliyun MQ topics:

  1. topic for default instance(without InstanceID)
    fulfill the name server address with endpoint and set ak, sk using the Session Credential API.

  2. topic for your own InstanceID
    change the GID to InstanceID+GID(InstanceID%GID),
    change the topic to InstanceID+GID(InstanceID%GID),
    fulfill the name server address with endpoint and set ak, sk using the Session Credential API.

Follow this checklist to help us incorporate your contribution quickly and easily. Notice, it would be helpful if you could finish the following 5 checklist(the last one is not necessary)before request the community to review your PR.

  • Make sure there is a Github issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a Github issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Format the pull request title like [ISSUE #123] Fix UnknownException when host config not exist. Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Write necessary unit-test(over 80% coverage) to verify your logic correction, more mock a little better when a cross-module dependency exists.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@ShannonDing ShannonDing added this to the 1.2.2 milestone Apr 15, 2019
@duhenglucky duhenglucky changed the title [ISSUE #121]Support connect Aliyun MQ endpoint [ISSUE #121]Support connect MQ endpoint with ACL Apr 15, 2019
@ShannonDing ShannonDing requested a review from duhenglucky April 16, 2019 02:08
@ShannonDing
Copy link
Member Author

@jonnxu Could you please review this PR, is there any side effect on the batch send method that you request before?

Copy link
Member

@vongosling vongosling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

keywords::max_size = 200 * 1024 * 1024, // max keep 3 log file defaultly
keywords::auto_flush = true);
logging::core::get()->set_filter(logging::trivial::severity >= logging::trivial::info);
// logging::core::get()->set_filter(logging::trivial::severity >= logging::trivial::info);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

//<!************************************************************************
} //<!end namespace;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So many format...

}
return nameServerAddr;
}
} // namespace rocketmq
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Useless comment?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flag of the right brave of the rocketmq namespace.

requestMap.insert(pair<string, string>("reconsumeTimes", UtilAll::to_string(reconsumeTimes)));
requestMap.insert(pair<string, string>("unitMode", UtilAll::to_string(unitMode)));
#endif
requestMap.insert(pair<string, string>("batch", UtilAll::to_string(batch)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here i think there will problem for send message to broker with signature, because produce signature by spas_sign in doBeforeRequest depends on all header fields

void ClientRPCHook::doBeforeRequest(const string& remoteAddr, RemotingCommand& request) {
。。。。
header->SetDeclaredFieldOfCommandHeader(requestMap);
map<string, string>::iterator it = requestMap.begin();
for (; it != requestMap.end(); ++it) {
totalMsg.append(it->second);
}
if (request.getMsgBody().length() > 0) {
totalMsg.append(request.getMsgBody());
}
char* pSignature =
rocketmqSignature::spas_sign(totalMsg.c_str(), totalMsg.size(), sessionCredentials.getSecretKey().c_str());
}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The server will not verify this field in the command header.

@ShannonDing ShannonDing merged commit 28c4cf0 into apache:master Apr 17, 2019
@ShannonDing ShannonDing deleted the endpoint branch April 17, 2019 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants