资源简介
代码片段和文件信息
package com.rabbitmq.test;
import java.io.IOException;
import com.rabbitmq.client.*;
public class ConsumerTests {
private final static String QUEUE_NAME = “hello“;
public static void main(String[] args) throws Exception{
ConnectionFactory factory = new ConnectionFactory();
factory.setHost(“localhost“);
Connection connection = factory.newConnection();
Channel channel = connection.createChannel();
channel.queueDeclare(QUEUE_NAME false false false null);
System.out.println(“ [*] Waiting for messages. To exit press CTRL+C“);
Consumer consumer = new DefaultConsumer(channel) {
@Override
public void handleDelivery(String consumerTag Envelope envelope AMQP.BasicProperties properties byte[] body)
thr
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2017-04-08 19:28 RabbitMQDemo-C\
文件 523 2017-04-08 20:07 RabbitMQDemo-C\.classpath
文件 390 2017-04-08 20:01 RabbitMQDemo-C\.project
目录 0 2017-04-08 19:28 RabbitMQDemo-C\.settings\
文件 598 2017-04-08 19:28 RabbitMQDemo-C\.settings\org.eclipse.jdt.core.prefs
目录 0 2017-04-08 20:07 RabbitMQDemo-C\bin\
目录 0 2017-04-08 20:07 RabbitMQDemo-C\bin\com\
目录 0 2017-04-08 20:07 RabbitMQDemo-C\bin\com\rabbitmq\
目录 0 2017-04-08 20:07 RabbitMQDemo-C\bin\com\rabbitmq\test\
文件 1511 2017-04-08 20:07 RabbitMQDemo-C\bin\com\rabbitmq\test\ConsumerTests$1.class
文件 1797 2017-04-08 20:07 RabbitMQDemo-C\bin\com\rabbitmq\test\ConsumerTests.class
目录 0 2017-04-08 19:31 RabbitMQDemo-C\src\
目录 0 2017-04-08 19:31 RabbitMQDemo-C\src\com\
目录 0 2017-04-08 19:31 RabbitMQDemo-C\src\com\rabbitmq\
目录 0 2017-04-08 19:52 RabbitMQDemo-C\src\com\rabbitmq\test\
文件 1035 2017-04-08 19:54 RabbitMQDemo-C\src\com\rabbitmq\test\ConsumerTests.java
目录 0 2017-04-08 19:28 RabbitMQDemo-P\
文件 523 2017-04-08 20:07 RabbitMQDemo-P\.classpath
文件 390 2017-04-08 20:01 RabbitMQDemo-P\.project
目录 0 2017-04-08 19:28 RabbitMQDemo-P\.settings\
文件 598 2017-04-08 19:28 RabbitMQDemo-P\.settings\org.eclipse.jdt.core.prefs
目录 0 2017-04-08 20:07 RabbitMQDemo-P\bin\
目录 0 2017-04-08 20:07 RabbitMQDemo-P\bin\com\
目录 0 2017-04-08 20:07 RabbitMQDemo-P\bin\com\rabbitmq\
目录 0 2017-04-08 20:07 RabbitMQDemo-P\bin\com\rabbitmq\test\
文件 2060 2017-04-08 20:07 RabbitMQDemo-P\bin\com\rabbitmq\test\ProducerTest.class
目录 0 2017-04-08 19:30 RabbitMQDemo-P\src\
目录 0 2017-04-08 19:30 RabbitMQDemo-P\src\com\
目录 0 2017-04-08 19:30 RabbitMQDemo-P\src\com\rabbitmq\
目录 0 2017-04-08 19:52 RabbitMQDemo-P\src\com\rabbitmq\test\
文件 960 2017-04-08 19:52 RabbitMQDemo-P\src\com\rabbitmq\test\ProducerTest.java
............此处省略0个文件信息
评论
共有 条评论