本文整理汇总了Java中org.springframework.amqp.rabbit.annotation.RabbitHandler类的典型用法代码示例。如果您正苦于以下问题:Java RabbitHandler类的具体用法?Java RabbitHandler怎么用?Java RabbitHandler使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RabbitHandler类属于org.springframework.amqp.rabbit.annotation包,在下文中一共展示了RabbitHandler类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processLogMessage
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitListener(queues = AppLogConfig.O2O_LOG_QUEUE)
@RabbitHandler
public void processLogMessage(Object message) {
try {
if (number <= 0) {
logger.info("====== game over ======");
return;
}
logger.info("====> receive message, number=" + number);
number--;
} catch (Exception e) {
e.printStackTrace();
}
}
示例2: receiveCheckQueueMessage
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
/**
* 处理更新记录消息
*/
@RabbitHandler
@RabbitListener(queues = "LianJiaCrawler.Check.Queue")
public void receiveCheckQueueMessage(Message message) {
try {
byte[] dataArray = message.getBody();
LOGGER.info("【接收消息】>>>队列目的地:{}", message.getMessageProperties().getConsumerQueue());
crawlerService.saveCheckData(dataArray);
} catch (Exception e) {
LOGGER.error(e.getMessage(), e);
}
}
示例3: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(@Payload CrispyBunOrder order) {
StringBuffer SB = new StringBuffer();
SB.append("New Order Received : \n");
SB.append("OrderId : " + order.getOrderId());
SB.append("\nItemId : " + order.getItemId());
SB.append("\nUserName : " + order.getUserName());
SB.append("\nDate : " + order.getOrderPlacedTime());
System.out.println(SB.toString());
}
示例4: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(String content) {
System.out.println("Receiver : " + content);
}
示例5: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public LoginDetails process(String content) {
Integer id = Integer.parseInt(content);
LoginDetails details = logindetailsServiceImpl.findLoginById(id);
return details ;
}
示例6: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public Flux<LoginDetails> process(String content) {
Integer id = Integer.parseInt(content);
Flux<LoginDetails> details =Flux.just(logindetailsServiceImpl.findLoginById(id));
return details ;
}
示例7: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(byte[] msg) {
mythMqReceiveService.processMessage(msg);
}
示例8: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(String hello) {
System.out.println("Receiver : " + hello);
}
示例9: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(String hello) {
System.out.println("Consumer : " + hello);
}
示例10: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(String hello) {
System.out.println("Receiver : " + hello);
}
示例11: receiveQueue
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void receiveQueue(String text) {
System.out.println("Consumer收到的报文为:"+text);
}
示例12: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(@Payload String data) {
System.out.println(new Date() + ": " + data);
}
示例13: process
import org.springframework.amqp.rabbit.annotation.RabbitHandler; //导入依赖的package包/类
@RabbitHandler
public void process(@Payload String foo) {
System.out.println(new Date() + ": " + foo);
}
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:SampleAmqpSimpleApplication.java