关于RabbitMQ 的默认交换机 的问题
|Default pre-declared names|
|Direct exchange||(Empty string) and amq.direct|
|Headers exchange||amq.match (and amq.headers in RabbitMQ)|
The default exchange is a direct exchange with no name (empty string) pre-declared by the broker.
It has one special property that makes it very useful for simple applications: every queue that is created is automatically bound to it with a routing key which is the same as the queue name.
他有一个特殊的特性对简单应用很有用：每个队列会自动将一个和队列名一致的 Routing Key 绑定到默认交换机上。
channel.basicPublish( "", "test_fuzai_queue_1", MessageProperties.BASIC, message.getBytes());
这个代码的意思是 其实就是将 消息发送到 这个test_fuzai_queue_1队列上
For example, when you declare a queue with the name of "search-indexing-online", the AMQP 0-9-1 broker will bind it to the default exchange using "search-indexing-online" as the routing key (in this context sometimes referred to as the binding key). Therefore, a message published to the default exchange with the routing key "search-indexing-online" will be routed to the queue "search-indexing-online". In other words, the default exchange makes it seem like it is possible to deliver messages directly to queues, even though that is not technically what is happening.