use of com.paascloud.provider.model.domain.TpcMqMessage in project paascloud-master by paascloud.
the class TpcMqMessageServiceImpl method confirmAndSendMessage.
@Override
public void confirmAndSendMessage(String messageKey) {
final TpcMqMessage message = tpcMqMessageMapper.getByMessageKey(messageKey);
if (message == null) {
throw new TpcBizException(ErrorCodeEnum.TPC10050002);
}
TpcMqMessage update = new TpcMqMessage();
update.setMessageStatus(MqSendStatusEnum.SENDING.sendStatus());
update.setId(message.getId());
update.setUpdateTime(new Date());
tpcMqMessageMapper.updateByPrimaryKeySelective(update);
// 创建消费待确认列表
this.createMqConfirmListByTopic(message.getMessageTopic(), message.getId(), message.getMessageKey());
// 直接发送消息
this.directSendMessage(message.getMessageBody(), message.getMessageTopic(), message.getMessageTag(), message.getMessageKey(), message.getProducerGroup(), message.getDelayLevel());
}
use of com.paascloud.provider.model.domain.TpcMqMessage in project paascloud-master by paascloud.
the class TpcMqMessageServiceImpl method resendMessageByMessageId.
@Override
public void resendMessageByMessageId(Long messageId) {
final TpcMqMessage message = tpcMqMessageMapper.selectByPrimaryKey(messageId);
if (message == null) {
throw new TpcBizException(ErrorCodeEnum.TPC10050006);
}
this.resendMessage(message);
}
Aggregations