{"record":{"id":"44a3538dd39846e7","repo":"paascloud/paascloud-master","slug":"tpc100500010","errorCode":"TPC100500010","errorMessage":"TPC100500010","messagePattern":"TPC100500010","errorType":"error_code","errorClass":"TpcBizException","httpStatus":null,"severity":"error","filePath":"paascloud-provider/paascloud-provider-tpc/src/main/java/com/paascloud/provider/service/impl/TpcMqMessageServiceImpl.java","lineNumber":198,"sourceCode":"\n\t@Override\n\tpublic void confirmConsumedMessage(final String cid, final String messageKey) {\n\t\tLong confirmId = tpcMqConfirmMapper.getIdMqConfirm(cid, messageKey);\n\t\ttpcMqConfirmMapper.confirmConsumedMessage(confirmId);\n\t}\n\n\t@Override\n\tpublic int updateMqConfirmStatus(final String cid, final String messageKey) {\n\t\treturn 0;\n\t}\n\n\t@Override\n\tpublic void createMqConfirmListByTopic(final String topic, final Long messageId, final String messageKey) {\n\t\tList<TpcMqConfirm> list = Lists.newArrayList();\n\t\tTpcMqConfirm tpcMqConfirm;\n\t\tList<String> consumerGroupList = tpcMqConsumerService.listConsumerGroupByTopic(topic);\n\t\tif (PublicUtil.isEmpty(consumerGroupList)) {\n\t\t\tthrow new TpcBizException(ErrorCodeEnum.TPC100500010, topic);\n\t\t}\n\t\tfor (final String cid : consumerGroupList) {\n\t\t\ttpcMqConfirm = new TpcMqConfirm(UniqueIdGenerator.generateId(), messageId, messageKey, cid);\n\t\t\tlist.add(tpcMqConfirm);\n\t\t}\n\n\t\ttpcMqConfirmMapper.batchCreateMqConfirm(list);\n\t}\n\n\t@Override\n\tpublic List<String> queryWaitingConfirmMessageKeyList(final MessageTaskQueryDto query) {\n\t\treturn tpcMqMessageMapper.queryWaitingConfirmMessageKeyList(query);\n\t}\n\n\t@Override\n\tpublic void handleWaitingConfirmMessage(final List<String> deleteKeyList, final List<String> resendKeyList) {\n\t\ttpcMqMessageMapper.batchDeleteMessage(deleteKeyList);\n\t\tfor (final String messageKey : resendKeyList) {","sourceCodeStart":180,"sourceCodeEnd":216,"githubUrl":"https://github.com/paascloud/paascloud-master/blob/781281a9503332ed3cef44ea618349d14230a127/paascloud-provider/paascloud-provider-tpc/src/main/java/com/paascloud/provider/service/impl/TpcMqMessageServiceImpl.java#L180-L216","documentation":"TPC100500010 means reliable-message confirm records cannot be created because the given topic has no registered consumer groups. createMqConfirmListByTopic requires at least one consumer group to build tpc_mq_confirm rows; an empty list aborts the flow.","triggerScenarios":"createMqConfirmListByTopic invoked (directly or via confirmAndSendMessage/saveAndSendMessage) for a topic with no entries in the TPC consumer registry.","commonSituations":"Producer publishes to a topic consumers never subscribed to; consumer registration record missing (consumer service not started/registered); topic name typo or case mismatch between producer and consumer config.","solutions":["Register the consumer groups for the topic via the TPC consumer management API/console before sending.","Verify consumer services are running and registered for that exact topic.","Check topic name spelling/case matches between producer and consumer configuration.","If the topic truly has no consumers, decide whether sending is intended; otherwise remove the send."],"exampleFix":"// before\ntpcMqConsumerService.saveConsumer(...) // ensure topic registered\n// after\n// ensure consumer group subscribed to topic, e.g.:\n// tpcMqConsumerService.saveConsumer(new TpcMqConsumer(\"order-group\", \"order-topic\", ...));\ntpcMqMessageService.saveAndSendMessage(dto);","handlingStrategy":"validation","validationCode":"List<String> groups = tpcMqConsumerService.listConsumerGroupByTopic(topic);\nif (groups == null || groups.isEmpty()) {\n    throw new IllegalStateException(\"No consumer groups registered for topic \" + topic);\n}","typeGuard":null,"tryCatchPattern":"try {\n    tpcMqMessageService.saveAndSendMessage(dto);\n} catch (TpcBizException e) {\n    if (\"TPC100500010\".equals(e.getMessage())) { /* register consumers or drop the send */ }\n    throw e;\n}","preventionTips":["Register consumer groups for every topic before producing","Keep topic names in shared constants to avoid typos","Add startup checks that all configured topics have subscribers"],"tags":["mq","topic","no-consumers","reliable-message"],"backgroundTag":"resource-not-found","analyzedSha":"781281a9503332ed3cef44ea618349d14230a127","analyzedAt":"2026-09-10T10:59:02.070Z","contentChangedAt":"2026-09-10T10:59:02.070Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}