package orchastack.core.xa.amqp.client;

import com.rabbitmq.client.Channel;

public interface MessageHandler {
	/**
	 * if Exception is thrown, the message will be nack and requeued.
	 * 
	 * @param envelope
	 * @param properties
	 * @param body
	 * @throws Exception
	 */
	public void handleMessage(AMQPMessage message) throws Exception;

	public void setAMQPConsumerTag(String consumerTag);

	public String getAMQPConsumerTag();

	public boolean isAutoACK();

	public void setAutoACK(boolean autoACK);

	/**
	 * channel used to ack message, the channel will be set immediately after
	 * channel is initiated.
	 */

	public Channel getChannel();

	public void setChannel(Channel channel);

}
