package org.ssssssss.magicapi.rocketmq.service;


import org.apache.rocketmq.common.message.MessageExt;
import org.ssssssss.magicapi.rocketmq.service.RocketMqService;
import org.ssssssss.script.MagicScriptContext;

/**
 * @author zzy
 */
public class DefaultRocketMqService implements RocketMqService {


    @Override
    public boolean beforeProduce(String topic, String tag, Object msg) {
        return true;
    }

    @Override
    public boolean afterProduce(String topic, String tag, Object msg) {
        return true;
    }

    @Override
    public boolean failProduce(String topic, String tag, Object msg) {
        return false;
    }

    @Override
    public boolean beforeConsume(MessageExt messageExt, MagicScriptContext magicScriptContext) {
        return true;
    }

    @Override
    public boolean afterConsume(MessageExt messageExt, MagicScriptContext magicScriptContext) {
        return true;
    }

    @Override
    public boolean failConsume(MessageExt messageExt, MagicScriptContext magicScriptContext) {
        return false;
    }
}
