Detailed Explanation of notes Rokcetmq

Architecture

Message to internal column, broker will be registered, broker cluster will be registered with each other .broker will create four queue is used to store information waiting to be consumer information consumption is recorded in consumOffset.json file, to avoid sending information .

 

 

send messages

Production side pull message from namesrv, according to the number of nodes brlker-master, to Tompic Broker corresponding to the queue (4) Send

Embodiment is a modulo operation (the number of messages / topic number corresponding to the queue), the polling is sent to the queue, provided the queue is randomly selected, if an ordered queue is ordered in the required transmission queue.

 

Code

Synchronous transmission scheme

, Producer after send the message, have to wait until the results are returned Broker, before proceeding to the follow-up.

Asynchronous transmission mode

PullConsumer

 

Published 73 original articles · won praise 1 · views 10000 +

Guess you like

Origin blog.csdn.net/wenxi2367/article/details/104190827