| package com.zt.common.message.producer; | 
|   | 
| import com.zt.common.message.model.Message; | 
| import com.zt.common.message.model.MessageSendException; | 
|   | 
| import java.util.List; | 
|   | 
| /** | 
|  * 消息发送提供者 | 
|  * | 
|  * @author jeff | 
|  */ | 
| public interface MessageProducer { | 
|   | 
|     /** | 
|      * 发送到队列中 | 
|      * | 
|      * @param message | 
|      *            发送消息 | 
|      * @throws MessageSendException | 
|      *             消息队列发送异常 | 
|      */ | 
|     void sendToQueue(Message message) throws MessageSendException; | 
|   | 
|     /** | 
|      * 发送列表到队列中 | 
|      * | 
|      * @param messages | 
|      *            发送消息集 | 
|      * @throws MessageSendException | 
|      *             消息队列发送异常 | 
|      */ | 
|     void sendToQueue(List<Message> messages) throws MessageSendException; | 
|   | 
| } |