RabbitMQ and Kafka A simple comparison from several angles
mq (Rabbitmq,kafka) Span style= "BACKGROUND-COLOR:INHERIT;; Font-family: "The song Body" is elaborated and made a simple comparison,
1" Application scenario
rabbitmq, follow AMQP agreement, by the intrinsic high concurrency of the erlanng language development, used in real-time reliability requirements of high-quality message delivery.
linkedin Span style= "BACKGROUND-COLOR:INHERIT;; font-family: Arial "" To 2010 year 12 month Open source message Publishing subscription system It is mainly used to process active streaming data , data processing of large data volumes.
2) Schema Model
RabbitMQFollowAMQPAgreement,RabbitMQof theBrokerbyExchange,binding,queuecomposition, whichExchangeand thebindingthe routing key that makes up the message;Producerby connectingChanneland theServerto communicate,ConsumerfromQueueget messages for consumption (long connections,Queuea message will be pushed toConsumerEnd,ConsumerLoop reads data from the input stream). RabbitMQinBrokera mechanism for confirming the message.
KafkaFollow the generalMQstructure,producer,Broker,Consumer, toConsumerfor the center, the consumer information of the message is saved by the clientConsumeron,Consumeraccording to the point of consumption, fromBrokeron Bulk Pulldata, no message acknowledgement mechanism.
3" throughput
less than kafka rabbitmq supports reliable delivery of messages, Supports transactions and does not support bulk operations; Storage-based reliability requires storage to be memory or hard disk.
with high throughput, internal batch processing with messages, zero-copy mechanism, data storage and acquisition is a local disk sequential batch operation, with o (1)
4" availability
support miror Span style= "BACKGROUND-COLOR:INHERIT;; font-family: queue queue Span style= "BACKGROUND-COLOR:INHERIT;; Font-family: Song body "> invalid, miror Queue takeover.
broker of the song body " Span style= "BACKGROUND-COLOR:INHERIT;; Font-family: Song body "> supports the main standby mode.
5" cluster load Balancer
RabbitMQ load Balancing requires a separate loadbalancer for support.
KafkaAdoptZookeeperOf the clusterBroker,Consumerfor management, you can registerTopicto theZookeeperto pass on;Zookeeperof coordination mechanisms,producerSave the correspondingTopicof theBrokerinformation that can be sent randomly or polled toBrokeron; andproducershards can be specified based on semantics, and messages are sent toBrokeron a shard.
RABBITMQ and Kafka a simple comparison from several angles