springboot操作rabbitmq

////DirectExchange directExchange = new DirectExchange("test.direct");
////amqpAdmin.declareExchange(directExchange);
//
////Map<String,Object> map = new HashMap<>();
////map.put("x-max-length",10);
//
////Queue queue = new Queue("test:count",true,false,false,map);
//Queue queue = new Queue("test:count");
//amqpAdmin.declareQueue(queue);
////Binding binding = new Binding("test.direct", Binding.DestinationType.EXCHANGE,"test.direct","test:test",null);
////Binding binding = new Binding("test:queue", Binding.DestinationType.QUEUE, "test.direct", "test.teset", null);
////amqpAdmin.declareBinding(binding);

//Map<String, Object> map = new HashMap<>();
//map.put("x-max-length", 10);
//declareQueue(new Queue("test:count", true, false, false, map));
//Map<String,Object> map = new HashMap<>();
//map.put("x-max-length",10);
//amqpAdmin.declareQueue(new Queue("test:count",true,false,false,map));
//Binding binding = new Binding("test:count", Binding.DestinationType.QUEUE, "jd.direct", "jd.dir", null);
//amqpAdmin.declareBinding(binding);

//rabbitTemplate.convertAndSend("jd.direct","jd.dir","hello world");
posted @ 2019-06-13 15:09  雷神约  阅读(195)  评论(0编辑  收藏  举报