Producer reliability implementation Article directory Producer reliability implementation Preface producer reliability Foreword When sending a message we may have thought that the message might be discarded. Starting from front to back according to the message transfer process, we start with the producer. It is possible for a producer to lose a message while sending it. […]
Tag: producer
Operating System – The most detailed explanation of the classic synchronization problem (Series 1 – Consumer Producer Problem)
Directory: 1. Producer and consumer issues (1) Single producer, consumer (2) Multiple producers and consumers (3) Practice questions Producer and consumer issues are often the focus of exams, so mastering this issue is critical. This article will focus on typical producer and consumer problems from simple to difficult, from easy to deep. Finally, we provide […]
[Linux] Producer and consumer model
producer and consumer concept Producer-consumer model based on BlockingQueue All code Producer and consumer concepts The producer-consumer pattern solves the strong coupling problem between producers and consumers through a container. Producers and consumers do not communicate directly with each other, but communicate through this container. Therefore, after the producer produces the data, it does not […]
Blocking queue-producer-consumer model
Introduction to blocking queue Standard library blocking queue usage Simple producer-consumer model based on blocking queues. Implement a simple blocking queue (based on array implementation) Introduction to blocking queue Don’t confuse it with the ready queue that we learned about multi-threading before; Blocking queue: It is also a queue, first in first out. With special […]
[RabbitMQ Practical Combat] 03 SpringBoot RabbitMQ producer and consumer examples
In the previous section, we wrote an example of native API for production and consumption. In fact, SpringBoot has re-encapsulated the native RabbitMQ client, making it cheaper for us to use the API. 1. Configuration file Dependency introduction <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-amqp</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>2.8.6</version> </dependency> </dependencies> The configuration […]
Kakfa – Producer mechanism principle and optimization
Producer is the producer component in the Kakfa model, which is the production source of data in the Kafka architecture. Although it is a relatively simple component as a whole, there are still many details that need to be scrutinized. For example, what is the implementation principle of Kafka’s Producer and how to send messages? […]
Traditional producer and consumer problems, Sychronized version and Lock version
1. Synchronized version of producer and consumer issues Interview: Singleton pattern, sorting algorithm, producer consumer, deadlock package com.kuang.pc; /** * Communication issues between threads, producer and consumer issues! Waiting to wake up, notification to wake up * Threads alternately execute A and B to operate the same variable num=0 * A num + 1; *Bnum-1; […]