package com.bonus.mq.tx;

import com.bonus.mq.rabbit.RabbitPropertiesExt;
import org.springframework.beans.factory.InitializingBean;

import java.sql.SQLException;
import java.util.List;

public interface TxMessageManager extends InitializingBean {
   void saveTxMessage(RabbitPropertiesExt.RabbitMessage message) throws SQLException;

   void afterSendSuccess(String messageId) throws SQLException;

   void afterSendFailed(String messageId, String cause) throws SQLException;

   void afterRollback(String messageId) throws SQLException;

   List<RabbitPropertiesExt.RabbitMessage> failedMessage() throws SQLException;
}
