Skip to content

Commit 24140ee

Browse files
committed
fixed:does not set timepublish value when the value = 0
1 parent db1d124 commit 24140ee

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

XEngine_Source/XEngine_MQServiceApp/MQService_TCPTask.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ bool MessageQueue_TCP_Handle(XENGINE_PROTOCOLHDR* pSt_ProtocolHdr, LPCXSTR lpszC
454454
BaseLib_OperatorMemory_Free((XPPPMEM)&ppSt_ListUser, nListCount);
455455
XLOG_PRINT(xhLog, XENGINE_HELPCOMPONENTS_XLOG_IN_LOGLEVEL_INFO, _X("%s消息端:%s,主题:%s,序列:%lld,投递数据到消息队列成功,通知客户端个数:%d"), lpszClientType, lpszClientAddr, st_DBQueue.tszQueueName, st_DBQueue.nQueueSerial, nListCount);
456456
}
457+
_xstprintf(st_DBQueue.tszQueuePublishTime, _X("0"));
457458
}
458459
else
459460
{

XEngine_Source/XQueue_ProtocolHdr.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REPTOPICUNBIND 0x7019 //回复
3838
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REQMSGMODIFY 0x7020 //消息修改请求
3939
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REPMSGMODIFY 0x7021 //消息修改回复
40-
4140
//用户协议
4241
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REQUSERLOG 0x7020 //用户登录
4342
#define XENGINE_COMMUNICATION_PROTOCOL_OPERATOR_CODE_MQ_REPUSERLOG 0x7021
@@ -68,10 +67,10 @@ typedef struct
6867
//消息队列服务协议
6968
typedef struct
7069
{
71-
XCHAR tszMQKey[256]; //此消息的KEY,不能为空
70+
XCHAR tszMQKey[MAX_PATH]; //此消息的KEY,不能为空
7271
__int64x nSerial; //包序列号
7372
__int64x nPubTime; //发布时间,根据自己需求配置时区
74-
int nKeepTime; //保持时间,单位秒,-1 永久存在 0 一次就结束,>0 保存秒数
73+
int nKeepTime; //可用时间,单位秒,>0 超时秒数
7574
XENGINE_PROTOCOL_MSGATTR st_MSGAttr; //消息属性
7675
}XENGINE_PROTOCOL_XMQ, * LPXENGINE_PROTOCOL_XMQ;
7776
typedef struct

0 commit comments

Comments
 (0)