use of com.paascloud.provider.model.domain.TpcMqConfirm in project paascloud-master by paascloud.
the class TpcMqMessageServiceImpl method createMqConfirmListByTopic.
@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);
}
Aggregations