Stage 5 3. Micro Services [studies] _day05 online messaging middleware RabbitMQ_12.RabbitMQ Research - operating modes - operating mode wildcards test




Routing mode:
1, monitor their queue for each consumer, and is provided with wildcards routingkey.
2, the message to the producer Broker, the switch forwards the message according to a specified queue routingkey.


Create test cases



The name of the switch

to clean up the scene

to delete this switch

to delete the queue



and then delete the sms queue

type switch becomes topic

The change routingKey




If the queue is inform.email.sms then these two queues can be matched, # represents any character, it can also represent an empty character

bind topic switches

Send a message


Send email and sms routingKey is the

re-designated inform.sms.email

test

Starting a separate email

Consumer end





The type of programming topic switch

name switch should also be amended

Consumers end -sms





Queue name and modify text messages routingKey




 

start testing

Manufacturer topic starts

transmitting the message 5

switches bound two queues. No queues specifies a wildcard.

5 information that you just sent to the email queue inside the


boot of consumer email and sms

Generating a second transmission

Let go of the second paragraph of code. Data transmission

five emial 5 sms messages and

email receives a

sms terminal also receives

Send third

The last room open loop code comments.


This data is sent 15

sms received, the data 10 get

email has been received. The received data 10


which is the wildcard mode Topic


 

Guess you like

Origin www.cnblogs.com/wangjunwei/p/11622743.html