springboot操作rabbitmq

Posted leigepython

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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");

以上是关于springboot操作rabbitmq的主要内容,如果未能解决你的问题,请参考以下文章

【第13期】springboot: springboot操作pdf

springboot整合ES的基本操作

springboot操作Elasticsearch

SpringBoot入坑-持久化操作

springboot操作mongodb

SpringBoot使用WebFlux响应式编程操作数据库