请转到[this] [1]资源并粘贴方案JSON以显示它:
https://jmcle.github.io/rabbitmq-visualizer/#
JSON scheme is:
{
"exchanges": [
{
"name": "topic.exch",
"type": "2",
"x": 299,
"y": 246,
"resource_type": "exchange",
"id": 1
},
{
"name": "exchange57",
"resource_type": "exchange",
"id": 57,
"type": "1",
"x": 382,
"y": 67
}
],
"queues": [
{
"name": "queue51",
"resource_type": "queue",
"id": 51,
"type": 0,
"x": 704,
"y": 203,
"messages": [],
"totalConsumers": 1,
"lastConsumer": 0
},
{
"name": "queue52",
"resource_type": "queue",
"id": 52,
"type": 0,
"x": 688,
"y": 60,
"messages": [],
"totalConsumers": 1,
"lastConsumer": 0
},
{
"name": "queue70",
"resource_type": "queue",
"id": 70,
"type": 0,
"x": 477,
"y": 202,
"messages": [
"75",
"76",
"77"
]
}
],
"bindings": [
{
"source": 8,
"vhost": "default",
"source_type": "producer",
"destination": 1,
"destination_type": "exchange",
"id": 16,
"routing_key": "di.usr.one",
"arguments": []
},
{
"source": 9,
"vhost": "default",
"source_type": "producer",
"destination": 1,
"destination_type": "exchange",
"id": 17,
"routing_key": "di.usr.two",
"arguments": []
},
{
"source": 52,
"vhost": "demo",
"destination": 10,
"destination_type": "consumer",
"routing_key": "key",
"arguments": [],
"id": 55,
"source_type": "queue"
},
{
"source": 51,
"vhost": "demo",
"destination": 32,
"destination_type": "consumer",
"routing_key": "key",
"arguments": [],
"id": 56,
"source_type": "queue"
},
{
"source": 57,
"vhost": "demo",
"destination": 52,
"destination_type": "queue",
"routing_key": "key",
"arguments": [],
"id": 59,
"source_type": "exchange"
},
{
"source": 57,
"vhost": "demo",
"destination": 51,
"destination_type": "queue",
"routing_key": "key",
"arguments": [],
"id": 60,
"source_type": "exchange"
},
{
"source": 57,
"vhost": "demo",
"destination": 70,
"destination_type": "queue",
"routing_key": "key",
"arguments": [],
"id": 71,
"source_type": "exchange"
},
{
"source": 1,
"vhost": "demo",
"destination": 57,
"destination_type": "exchange",
"routing_key": "russia.moscow",
"arguments": [],
"id": 72,
"source_type": "exchange"
}
],
"producers": [
{
"name": "russia.moscow",
"x": 157,
"y": 152,
"interval": 5,
"publish": {
"to": 1,
"payload": "one",
"routing_key": "di.usr.one"
},
"resource_type": "producer",
"id": 8
},
{
"name": "ukraine.kiev",
"x": 106,
"y": 306,
"interval": 5,
"publish": {
"to": 1,
"payload": "two",
"routing_key": "di.usr.two"
},
"resource_type": "producer",
"id": 9
}
],
"consumers": [
{
"name": "app.one.a",
"x": 850,
"y": 64,
"consume": 2,
"resource_type": "consumer",
"id": 10
},
{
"name": "app.one.b",
"resource_type": "consumer",
"id": 32,
"type": 0,
"x": 856,
"y": 181
}
]
}
如您所见,我让生产者将具有特定键的消息发送到主题交换,然后将交换重定向消息发送到扇出交换,以将消息发送到所有队列。 / p>
答案 0 :(得分:-2)
很可能,所有与主题russia.moscow
匹配的 not 消息都不会被路由到任何队列。这样的消息将被丢弃。这是不利吗?只有您可以根据此设置执行的操作。
这样的规模吗?为什么不呢?