接口 com.taobao.metamorphosis.client.producer.SendMessageCallback
的使用

使用 SendMessageCallback 的软件包
com.taobao.metamorphosis.client.extension.spring   
com.taobao.metamorphosis.client.producer   
 

com.taobao.metamorphosis.client.extension.springSendMessageCallback 的使用
 

参数类型为 SendMessageCallbackcom.taobao.metamorphosis.client.extension.spring 中的方法
 void MetaqTemplate.send(MessageBuilder builder, SendMessageCallback cb)
          Send message asynchronously with callback.
 void MetaqTemplate.send(MessageBuilder builder, SendMessageCallback cb, long timeout, TimeUnit unit)
          Send message asynchronously with callback.
 

com.taobao.metamorphosis.client.producerSendMessageCallback 的使用
 

参数类型为 SendMessageCallbackcom.taobao.metamorphosis.client.producer 中的方法
 void SimpleMessageProducer.sendMessage(Message message, SendMessageCallback cb)
           
 void MessageProducer.sendMessage(Message message, SendMessageCallback cb)
          异步发送消息,在默认时间内(3秒)回调callback,此模式下无法使用事务
 void SimpleMessageProducer.sendMessage(Message message, SendMessageCallback cb, long time, TimeUnit unit)
           
 void MessageProducer.sendMessage(Message message, SendMessageCallback cb, long time, TimeUnit unit)
          异步发送消息,在指定时间内回调callback,此模式下无法使用事务
 



Copyright © 2010–2013. All rights reserved.