-
Notifications
You must be signed in to change notification settings - Fork 166
feat(version): add api to get SDK versions #261
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
562b2ab
feat(version): add api to get SDK versions
ShannonDing e15217d
chore(style): code format for versions get.
ShannonDing a29d2e4
test(unittest): add test case for version get
ShannonDing 8cc61f9
test(unittest): add test case for version get
ShannonDing 8444c68
chore(style): format sdk version style
ShannonDing b269325
chore(style): format sdk version style
ShannonDing 219a0b1
feat(config): show the current config when client start
ShannonDing b788f2e
feat(config): show the current config when client start
ShannonDing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
* limitations under the License. | ||
*/ | ||
|
||
#include "include/DefaultMQClient.h" | ||
#include "DefaultMQClient.h" | ||
#include "Logging.h" | ||
#include "MQClientFactory.h" | ||
#include "MQClientManager.h" | ||
|
@@ -24,11 +24,11 @@ | |
#include "UtilAll.h" | ||
|
||
namespace rocketmq { | ||
|
||
// hard code first. | ||
#define ROCKETMQCPP_VERSION "2.0.0" | ||
#define BUILD_DATE "02-14-2020" | ||
#define BUILD_DATE "22:50:18 02-14-2020" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ToDo, hope to be fixed in the near long time. |
||
// display version: strings bin/librocketmq.so |grep VERSION | ||
const char* rocketmq_build_time = "VERSION: " ROCKETMQCPP_VERSION ", BUILD DATE: " BUILD_DATE " "; | ||
const char* rocketmq_build_time = "CPP CORE VERSION: " ROCKETMQCPP_VERSION ", BUILD TIME: " BUILD_DATE; | ||
|
||
//<!************************************************************************ | ||
DefaultMQClient::DefaultMQClient() { | ||
|
@@ -56,6 +56,11 @@ string DefaultMQClient::getMQClientId() const { | |
// return processId + "-" + clientIP + "@" + m_instanceName; | ||
return clientIP + "@" + processId + "#" + m_instanceName; | ||
} | ||
// version | ||
string DefaultMQClient::getClientVersionString() const { | ||
string version(rocketmq_build_time); | ||
return version; | ||
} | ||
|
||
//<!groupName; | ||
const string& DefaultMQClient::getGroupName() const { | ||
|
@@ -222,6 +227,19 @@ void DefaultMQClient::setSessionCredentials(const string& input_accessKey, | |
const SessionCredentials& DefaultMQClient::getSessionCredentials() const { | ||
return m_SessionCredentials; | ||
} | ||
|
||
void DefaultMQClient::showClientConfigs() { | ||
// LOG_WARN("*****************************************************************************"); | ||
LOG_WARN("ClientID:%s", getMQClientId().c_str()); | ||
LOG_WARN("GroupName:%s", m_GroupName.c_str()); | ||
LOG_WARN("NameServer:%s", m_namesrvAddr.c_str()); | ||
LOG_WARN("NameServerDomain:%s", m_namesrvDomain.c_str()); | ||
LOG_WARN("NameSpace:%s", m_nameSpace.c_str()); | ||
LOG_WARN("InstanceName:%s", m_instanceName.c_str()); | ||
LOG_WARN("UnitName:%s", m_unitName.c_str()); | ||
LOG_WARN("PullThreadNum:%d", m_pullThreadNum); | ||
LOG_WARN("TcpConnectTimeout:%lld ms", m_tcpConnectTimeout); | ||
LOG_WARN("TcpTransportTryLockTimeout:%lld s", m_tcpTransportTryLockTimeout); | ||
// LOG_WARN("*****************************************************************************"); | ||
} | ||
//<!************************************************************************ | ||
} // namespace rocketmq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.