异常事件处理
异常事件处理
Topic:{tenant}/{namespace}/v1-business-model-error-{appType}
error标识此topic是外部业务模型事件的错误响应消息
payload
{
"msgId":"hfjld729jc927894n02783n49"//建议uuid确定消息唯一性
"reportTs": 1661154622,
"profile": {
"poiCode": "s0120001",
"appType": "业务模型分类",
"modelId": 0//json标识,未来通过此Id匹配对应的json的schema
},
"events": {
"{event}_error": {
"eventTs": 148813512323,
"eventType": 2, //2标识这是错误告警
"msg":"错误信息描述", //公共参数,数据类型:string;与api公共参数一致
"status":"ERROR",//错误码,数据类型:string;与api公共参数一致
"code":400,//错误码,默认400业务错误码,数据类型:int;与api公共参数一致
"其他业务字段":"value"
}
}
}
示例:
正常情况:
{tenant}/default/v1-business-model-user
default只是此事件是租户级别的,不代表只限于default 情况
{
"reportTs": 1661154622,
"profile": {
"poiCode": "s0120001",
"appType": "user",
"modelId": 120001
},
"events": {
"add": {
"eventTs": 148813512323,
"eventType": 1,
"userList":[{
"name": "姓名",
"userName" : "用户账号",
"areaCode":"区号",
"phone":"手机号",
"status":1,
"gender":1,
"email":"邮箱号",
"headPicture":"头像地址",
"groupId":"组织id",
"id":"来源方主键id"//对应通行证的全局唯一UserId
}]
}
}
}
事件消费失败情况
{tenant}/default/v1-business-model-error-user
default只是此事件是租户级别的,不代表只限于default 情况
{
"msgId":"hfjld729jc927894n02783n49"//建议uuid确定消息唯一性
"reportTs": 1661154622,
"profile": {
"poiCode": "s0120001",
"appType": "user",
"modelId": 120001
},
"events": {
"add_error": {
"eventTs": 148813512323,
"eventType": 2, //2标识这是错误告警
"msg":"添加用户失败", //公共参数,数据类型:string;与api公共参数一致
"status":"USER_ADD_ERROR",//错误码,数据类型:string;与api公共参数一致
"code":400,//错误码,默认400,数据类型:int;与api公共参数一致
"userList":[{
"name": "姓名",
"userName" : "用户账号",
"areaCode":"区号",
"phone":"手机号",
"status":1,
"gender":1,
"email":"邮箱号",
"headPicture":"头像地址",
"groupId":"组织id",
"id":"来源方主键id"//对应通行证的全局唯一UserId
}]
}
}
}
修改于 2023-06-30 05:38:14