paascloud/paascloud-master · error · TpcBizException

TPC100500010

TPC100500010

Error message

TPC100500010

What it means

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.

Solutions

  1. Register the consumer groups for the topic via the TPC consumer management API/console before sending.
  2. Verify consumer services are running and registered for that exact topic.
  3. Check topic name spelling/case matches between producer and consumer configuration.
  4. If the topic truly has no consumers, decide whether sending is intended; otherwise remove the send.

Example fix

// before
tpcMqConsumerService.saveConsumer(...) // ensure topic registered
// after
// ensure consumer group subscribed to topic, e.g.:
// tpcMqConsumerService.saveConsumer(new TpcMqConsumer("order-group", "order-topic", ...));
tpcMqMessageService.saveAndSendMessage(dto);
Defensive patterns

Strategy: validation

Validate before calling

List<String> groups = tpcMqConsumerService.listConsumerGroupByTopic(topic);
if (groups == null || groups.isEmpty()) {
    throw new IllegalStateException("No consumer groups registered for topic " + topic);
}

Try / catch

try {
    tpcMqMessageService.saveAndSendMessage(dto);
} catch (TpcBizException e) {
    if ("TPC100500010".equals(e.getMessage())) { /* register consumers or drop the send */ }
    throw e;
}

Prevention

When it happens

Trigger: createMqConfirmListByTopic invoked (directly or via confirmAndSendMessage/saveAndSendMessage) for a topic with no entries in the TPC consumer registry.

Common situations: 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.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of paascloud/paascloud-master@781281a950 (2026-09-10). Data as JSON: /api/errors/44a3538dd39846e7. Report an issue: GitHub.

Appendix: source

Thrown at paascloud-provider/paascloud-provider-tpc/src/main/java/com/paascloud/provider/service/impl/TpcMqMessageServiceImpl.java:198

	@Override
	public void confirmConsumedMessage(final String cid, final String messageKey) {
		Long confirmId = tpcMqConfirmMapper.getIdMqConfirm(cid, messageKey);
		tpcMqConfirmMapper.confirmConsumedMessage(confirmId);
	}

	@Override
	public int updateMqConfirmStatus(final String cid, final String messageKey) {
		return 0;
	}

	@Override
	public void createMqConfirmListByTopic(final String topic, final Long messageId, final String messageKey) {
		List<TpcMqConfirm> list = Lists.newArrayList();
		TpcMqConfirm tpcMqConfirm;
		List<String> consumerGroupList = tpcMqConsumerService.listConsumerGroupByTopic(topic);
		if (PublicUtil.isEmpty(consumerGroupList)) {
			throw new TpcBizException(ErrorCodeEnum.TPC100500010, topic);
		}
		for (final String cid : consumerGroupList) {
			tpcMqConfirm = new TpcMqConfirm(UniqueIdGenerator.generateId(), messageId, messageKey, cid);
			list.add(tpcMqConfirm);
		}

		tpcMqConfirmMapper.batchCreateMqConfirm(list);
	}

	@Override
	public List<String> queryWaitingConfirmMessageKeyList(final MessageTaskQueryDto query) {
		return tpcMqMessageMapper.queryWaitingConfirmMessageKeyList(query);
	}

	@Override
	public void handleWaitingConfirmMessage(final List<String> deleteKeyList, final List<String> resendKeyList) {
		tpcMqMessageMapper.batchDeleteMessage(deleteKeyList);
		for (final String messageKey : resendKeyList) {

View on GitHub (pinned to 781281a950)