Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
39869f7
update:depend library
xengine-qyt May 29, 2025
96dbbb4
update:depend library
xengine-qyt Jun 11, 2025
580ac65
fixed:sometime load configure memory leak
xengine-qyt Jun 11, 2025
e219e08
modify:depend library direction name
xengine-qyt Jul 4, 2025
8fffbf4
update:depend library
xengine-qyt Jul 4, 2025
b63cc3d
update:vs bat file
xengine-qyt Jul 4, 2025
502cbbb
modify:start parameter are not case sensitive
xengine-qyt Jul 7, 2025
2552ef9
ci:add rocky linux 10 support
xengine-qyt Jul 7, 2025
91d6c8c
update:read me and depend library
xengine-qyt Jul 10, 2025
b3f5089
update:depend library
xengine-qyt Aug 22, 2025
d9feb48
modify:start parameter are not case sensitive
xengine-qyt Aug 22, 2025
9cb8e09
fixed:build failure
xengine-qyt Aug 22, 2025
4ac2044
fixed:version print failure when set -v parameter
xengine-qyt Aug 26, 2025
7ecfaa6
added:http basic and digest verification support
xengine-qyt Aug 28, 2025
cc8fd6f
improved:reply message protocol set
xengine-qyt Aug 28, 2025
7797ed3
added:email notify support when set recv user
xengine-qyt Aug 28, 2025
b9bfd9b
modify:message header size
xengine-qyt Aug 28, 2025
2261bcc
fixed:header protocol field incorrect when unread message reply
xengine-qyt Aug 28, 2025
96069c2
fixed:windows build failure
xengine-qyt Aug 28, 2025
2025909
fixed:windows build failure
xengine-qyt Aug 28, 2025
465c231
modify:Message notifications now support additional notifications and…
xengine-qyt Aug 29, 2025
78c581e
added:time publish for message notify
xengine-qyt Aug 29, 2025
29a60be
update:readme and document
xengine-qyt Sep 1, 2025
d04cbb7
update:configure file
xengine-qyt Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 18 additions & 6 deletions .github/workflows/Rocky_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build:
runs-on: ${{ matrix.runner }}
container:
image: rockylinux/rockylinux:9.5
image: rockylinux/rockylinux:${{ matrix.version }}
options: --platform ${{ matrix.platform }}
strategy:
matrix:
Expand All @@ -25,10 +25,22 @@ jobs:
runner: ubuntu-24.04
platform: linux/amd64
artifact: x86-64
version: 9
- arch: amd64
runner: ubuntu-24.04
platform: linux/amd64
artifact: x86-64
version: 10
- arch: arm64
runner: ubuntu-24.04-arm
platform: linux/arm64
artifact: Arm64
version: 9
- arch: arm64
runner: ubuntu-24.04-arm
platform: linux/arm64
artifact: Arm64
version: 10

steps:
- name: Checkout main repository code
Expand All @@ -46,7 +58,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: libxengine/XEngine_OPenSource
path: XEngine_Source/XEngine_Depend
path: XEngine_Source/XEngine_DependLibrary

- name: Set TERM variable
run: echo "TERM=xterm" >> $GITHUB_ENV
Expand All @@ -59,9 +71,9 @@ jobs:
- name: install xengine library
run: |
latest_tag=$(curl -s https://api.github.com/repos/libxengine/libxengine/releases/latest | jq -r .tag_name)
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_9_${{ matrix.artifact }}.zip
unzip ./XEngine_RockyLinux_9_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_9_${{ matrix.artifact }}
cd XEngine_RockyLinux_9_${{ matrix.artifact }}
wget https://github.com/libxengine/libxengine/releases/download/$latest_tag/XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip
unzip ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}.zip -d ./XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
cd XEngine_RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}

chmod 777 *
./XEngine_LINEnv.sh -i 3
Expand All @@ -85,6 +97,6 @@ jobs:
- name: Upload folder as artifact with RockyLinux
uses: actions/upload-artifact@v4
with:
name: XEngine_MQServiceApp-RockyLinux_9_${{ matrix.artifact }}
name: XEngine_MQServiceApp-RockyLinux_${{ matrix.version }}_${{ matrix.artifact }}
path: XEngine_Release/
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/debian_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: libxengine/XEngine_OPenSource
path: XEngine_Source/XEngine_Depend
path: XEngine_Source/XEngine_DependLibrary

- name: Set TERM variable
run: echo "TERM=xterm" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fedora_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: libxengine/XEngine_OPenSource
path: XEngine_Source/XEngine_Depend
path: XEngine_Source/XEngine_DependLibrary

- name: install system package
run: |
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "XEngine_Source/XEngine_Depend"]
path = XEngine_Source/XEngine_Depend
path = XEngine_Source/XEngine_DependLibrary
url = https://github.com/libxengine/XEngine_OPenSource.git
30 changes: 30 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
XEngine_MQService V3.17.0.1001

增加:rocky linux 10 支持
增加:http basic和digest验证支持
增加:电子邮件通知功能
更新:依赖库
更新:匹配最新xengine 版本
优化:消息响应设置
修改:依赖库目录名
修改:启动参数不区分大小写
修改:消息协议头大小
修正:某些时候配置读取内存溢出
修正:版本输出错误
修正:未读消息协议头字段不正确
删除:注册验证

added:ci rocky linux 10 support
added:http basic and digest verification support
added:email notify support
update:depend library
update:match xengine last version
improved:reply message protocol set
modify:depend library direction name
modify:start parameter are not case sensitive
modify:message header size
fixed:sometime load configure memory leak
fixed:version print failure when set -v parameter
fixed:header protocol field incorrect when unread message reply
delete:register authorize
======================================================================================
XEngine_MQService V3.16.0.1001

增加:使用内存池发送数据
Expand Down
5 changes: 4 additions & 1 deletion README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ this software support following features
19. message attritube
20. point to point message
21. Memory Database
22. http verification
23. email notify
24. sms notify(plan)

## install

Expand All @@ -54,7 +57,7 @@ Requires MYSQL service support, execute XEngine_SQLFile/CreateDatabase.sql to cr
Execute XEngine_SQLFile/XEngine_MQData.sql and XEngine_SQLFile/XEngine_MQUser.sql to create the table

#### sub module
Due to the dependent sub-modules, after you checkout the warehouse, execute the following command in the warehouse directory to pull the sub-modules
Due to the dependent sub-modules, after you checkout the resprepository, execute the following command in the resprepository directory to pull the sub-modules
git submodule init
git submodule update

Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ c c++Message Service
19. 消息属性
20. 点对点消息
21. 高速缓存
22. http验证
23. 电子邮件通知
24. 短信通知(plan)

## 安装教程

Expand All @@ -59,7 +62,7 @@ macos执行:./XEngine_LINEnv.sh -i 3
由于依赖的子模块,在你checkout仓库后,在仓库目录下执行下面的命令拉取子模块
git submodule init
git submodule update
如果github访问失败,你也可以clone该项目,在主目录下使用命令:git clone https://gitee.com/xengine/XEngine_OPenSource.git XEngine_Source/XEngine_Depend
如果github访问失败,你也可以clone该项目,在主目录下使用命令:git clone https://gitee.com/xengine/XEngine_OPenSource.git XEngine_Source/XEngine_DependLibrary

#### Windows
使用VS打开并且编译,支持WINDOWS 7SP1以上系统
Expand Down
4 changes: 2 additions & 2 deletions XEngine_Apps/MQCore_HTTPApp/MQCore_HTTPApp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(XEngine_Include);$(IncludePath)</IncludePath>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down
8 changes: 4 additions & 4 deletions XEngine_Apps/MQCore_HTTPApp/MQCore_HTTPApp.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="源文件\头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="MQCore_HTTPApp.cpp">
Expand Down
53 changes: 52 additions & 1 deletion XEngine_Apps/MQCore_TCPApp/MQCore_TCPApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ using namespace std;
XSOCKET m_Socket;
__int64x nLastNumber = 0;
LPCXSTR lpszKey = _X("XEngine_CommKey"); //主题
LPCXSTR lpszUser = _X("aaadddzxc");
LPCXSTR lpszUser = _X("123123aa");
LPCXSTR lpszPass = _X("123123");

void MQ_Authorize()
Expand Down Expand Up @@ -247,6 +247,56 @@ void MQ_Post(LPCXSTR lpszMsgBuffer, int nType = 0, int nPubTime = -1, bool bSelf
memcpy(&st_XMQProtocol, ptszMsgBuffer, sizeof(XENGINE_PROTOCOL_XMQ));
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
}
void MQ_PostEMail(LPCXSTR lpszMsgBuffer)
{
int nLen = 0;
XENGINE_PROTOCOLHDR st_ProtocolHdr;
XENGINE_PROTOCOL_XMQ st_XMQProtocol;
XCHAR tszMsgBuffer[2048];

memset(tszMsgBuffer, '\0', sizeof(tszMsgBuffer));
memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR));
memset(&st_XMQProtocol, '\0', sizeof(XENGINE_PROTOCOL_XMQ));

st_ProtocolHdr.wHeader = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_HEADER;
st_ProtocolHdr.unOperatorType = ENUM_XENGINE_COMMUNICATION_PROTOCOL_TYPE_XMQ;
st_ProtocolHdr.unOperatorCode = XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REQPOST;
st_ProtocolHdr.byIsReply = true; //获得处理返回结果
st_ProtocolHdr.byVersion = ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_STRING;
st_ProtocolHdr.unPacketSize = sizeof(XENGINE_PROTOCOL_XMQ) + strlen(lpszMsgBuffer);
st_ProtocolHdr.wTail = XENGIEN_COMMUNICATION_PACKET_PROTOCOL_TAIL;

st_XMQProtocol.nSerial = 0; //序列号,0服务会自动处理
st_XMQProtocol.nKeepTime = 0;
st_XMQProtocol.nPubTime = 0;
strcpy(st_XMQProtocol.tszMQKey, lpszKey);
strcpy(st_XMQProtocol.tszMQUsr, "[email protected]");

st_XMQProtocol.st_MSGAttr.byAttrEMail = 1;

nLen = sizeof(XENGINE_PROTOCOLHDR) + st_ProtocolHdr.unPacketSize;
memcpy(tszMsgBuffer, &st_ProtocolHdr, sizeof(XENGINE_PROTOCOLHDR));
memcpy(tszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR), &st_XMQProtocol, sizeof(XENGINE_PROTOCOL_XMQ));
memcpy(tszMsgBuffer + sizeof(XENGINE_PROTOCOLHDR) + sizeof(XENGINE_PROTOCOL_XMQ), lpszMsgBuffer, strlen(lpszMsgBuffer));

if (!XClient_TCPSelect_SendMsg(m_Socket, tszMsgBuffer, nLen))
{
_xtprintf("发送投递失败!\n");
return;
}
nLen = 2048;
XCHAR* ptszMsgBuffer;
memset(&st_ProtocolHdr, '\0', sizeof(XENGINE_PROTOCOLHDR));

if (!XClient_TCPSelect_RecvPkt(m_Socket, &ptszMsgBuffer, &nLen, &st_ProtocolHdr))
{
_xtprintf("接受数据失败!\n");
return;
}
memset(&st_XMQProtocol, '\0', sizeof(XENGINE_PROTOCOL_XMQ));
memcpy(&st_XMQProtocol, ptszMsgBuffer, sizeof(XENGINE_PROTOCOL_XMQ));
BaseLib_Memory_FreeCStyle((XPPMEM)&ptszMsgBuffer);
}
void MQ_Get(int nType = 0)
{
int nLen = 0;
Expand Down Expand Up @@ -529,6 +579,7 @@ int main(int argc, char** argv)
_xtprintf("连接成功!\n");

MQ_Authorize();
//MQ_PostEMail("test for email");
MQ_GetUNRead();
MQ_Create();
MQ_Post(NULL, ENUM_XENGINE_PROTOCOLHDR_PAYLOAD_TYPE_BIN, -1, true);
Expand Down
4 changes: 2 additions & 2 deletions XEngine_Apps/MQCore_WSApp/MQCore_WSApp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib32);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_Depend/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<IncludePath>$(XEngine_Include);../../XEngine_Source/XEngine_DependLibrary/XEngine_Module/jsoncpp;$(IncludePath)</IncludePath>
<LibraryPath>$(XEngine_Lib64);$(LibraryPath)</LibraryPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down
Binary file modified XEngine_Docment/Docment_en.docx
Binary file not shown.
Binary file modified XEngine_Docment/Docment_zh.docx
Binary file not shown.
102 changes: 58 additions & 44 deletions XEngine_Release/XEngine_Config/XEngine_Config.json
Original file line number Diff line number Diff line change
@@ -1,53 +1,67 @@
{
"tszIPAddr":"127.0.0.1",
"tszTopic":"XEngine_CommKey",
"bDeamon":0,
"nTCPPort":5200,
"nWSPort":5201,
"nHttpPort":5202,
"nMQTTPort":5203,
"XMax":{
"nMaxClient":10000,
"nMaxQueue":10000,
"nIOThread":2,
"nTCPThread":2,
"nHttpThread":2,
"nWSThread":2,
"nMQTTThread":2
"tszIPAddr": "127.0.0.1",
"tszTopic": "XEngine_CommKey",
"bDeamon": 0,
"nTCPPort": 5200,
"nWSPort": 5201,
"nHttpPort": 5202,
"nMQTTPort": 5203,
"XMax": {
"nMaxClient": 10000,
"nMaxQueue": 10000,
"nIOThread": 2,
"nTCPThread": 2,
"nHttpThread": 2,
"nWSThread": 2,
"nMQTTThread": 2
},
"XLog":{
"tszLOGFile":"./XEngine_Log/XEngine_MQServiceApp.Log",
"MaxSize":1024000,
"MaxCount":10,
"LogLeave":32,
"LogType":17
"XLog": {
"tszLOGFile": "./XEngine_Log/XEngine_MQServiceApp.Log",
"MaxSize": 1024000,
"MaxCount": 10,
"LogLeave": 32,
"LogType": 17
},
"XSql":{
"SQLAddr":"10.0.4.150",
"SQLPort":3306,
"SQLUser":"root",
"SQLPass":"123123aa"
"XSql": {
"SQLAddr": "127.0.0.1",
"SQLPort": 3306,
"SQLUser": "root",
"SQLPass": "123123"
},
"XPass":{
"nTimeout":2,
"tszPassRegister":"",
"tszPassUNReg":"",
"tszPassLogin":"",
"tszPassLogout":""
"XPass": {
"nTimeout": 2,
"tszPassRegister": "",
"tszPassUNReg": "",
"tszPassLogin": "",
"tszPassLogout": ""
},
"XMemory":{
"bDataQueryEnable":true,
"bDataInsertEnable":true,
"bUserQueryEnable":true,
"nTimeLast":3600,
"nTimeCount":0
"XMemory": {
"bDataQueryEnable": true,
"bDataInsertEnable": true,
"bUserQueryEnable": true,
"nTimeLast": 3600,
"nTimeCount": 0
},
"XAuthorize":{
"bHTTPAuth":true
"XVerification": {
"bEnable": false,
"nVType": 1,
"tszAuthPass": ""
},
"XReport":{
"bEnable":true,
"tszServiceName":"XEngine_MQService",
"tszAPIUrl":"http://app.xyry.org:5501/api?function=machine"
"XNotify": {
"EmailNotify": {
"bEnable": true,
"tszEMailSubject": "XEngine MessageQueue Notify",
"tszServiceAddr": "smtp://smtp.163.com",
"tszUser": "[email protected]",
"tszPass": "1"
},
"SMSNotify": {
"bEnable": false
}
},
"XReport": {
"bEnable": true,
"tszServiceName": "XEngine_MQService",
"tszAPIUrl": "http://app.xyry.org:5501/api?function=machine"
}
}
Loading
Loading