Tag:Producer
-
Time:2021-4-17
preface Recently, the business development department has put forward a requirement to our department, because their development environment and test environment share a set of Kafka. They hope our department can help them automatically add environment prefix to the topic of Kafka. For example, the topic of development environment is dev_ Topic, test environment, then […]
-
Time:2021-4-16
0. Architecture introduction Simulate the real-time stream on the line, such as the user’s operation log. After collecting the data, process it. For the time being, only consider the data collection and useHtml+Jquery+Nginx+Ngx_kafka_module+KafkaTo achieve, among themNgx_kafka_moduleIt’s open source. It’s used to dock nginx andKafkaA component of. 1. Requirement description 1.1 usehtmlandjquerySimulate user request log It […]
-
Time:2021-4-9
In the daily work of the team, Tencent cloud is generally used as the message queueCKafka. Ckafka provides a highly reliable out of the box message queuing capability, so that we can use it safely in our daily life and reduce the investment in operation and maintenance. However, even so, we still need to learn […]
-
Time:2021-3-30
Original address:https://github.com/WilburXu/b… Kafka architecture Broker service proxy node Service proxy node. For Kafka, broker can be simply regarded as an independent Kafka service node or Kafka service instance. In most cases, a broker can also be regarded as a Kafka server, provided that only one Kafka instance is deployed on the server, and one or […]
-
Time:2021-3-21
Write on the front It’s the peak season of job hopping at the end of the year. When many small partners go out for an interview, many interviewers will ask questions about the message queue. Many of them don’t answer perfectly. Some of them know the answer in their heart, but they don’t express it […]
-
Time:2021-3-18
In order to prevent malicious registration, we need to introduce SMS verification code into website registration. The overall process is as followsIn addition, in order to optimize the process, the method of sending short messages in SDK needs to be modified to singleton class mode, so as to prevent the high concurrency from taking up […]
-
Time:2021-3-15
Language: Java (spring boot), single KafkaScenario: in the same group, two consumers consume a topic at the same time Implementation process: First, modify the partitions of the topic ./kafka-topics.sh –bootstrap-server localhost:9092 –alter –partitions 2 –topic topic-name Then modify the project configuration file spring: kafka: listener: concurrency: 2 Producer code @SpringBootTest class ProducerApplicationTests { @Autowired private […]
-
Time:2021-3-5
introduction This paper is the fourteenth,Conditional variables for thread synchronizationIn the last article, I introduced the read-write lock. In the case of more reading and less writing, the performance of read-write lock is better than mutex. This article introduces an important method of processing thread synchronization—Conditional variable Conditional variable Conditional variable is a relatively complex […]
-
Time:2021-2-25
For this Kafka project, I will focus on the overall architecture of the system, design and code implementation. With you bar source code, learn skills, knowledge. I hope you continue to pay attention and witness growth together! I believe: the road of technology, ten years as one day! Ten years to sharpen a sword! Previous […]
-
Time:2021-2-23
Kafka was originally developed by LinkedIn company in Scala language as a multi partition, multi copy distributed messaging system based on zookeeper coordination, which has been donated to Apache foundation. At present, Kafka has been positioned as a distributed streaming processing platform, which is widely used for its high throughput, persistence, horizontal scalability, support for […]
-
Time:2021-2-12
Using docker, it is very convenient to build Kafka cluster on one machine and test it. In order to simplify the configuration process, docker compose is used to build. The construction process of Kafka is as follows: Write docker- compose.yml The contents are as follows: version: ‘3.3’ services: zookeeper: image: wurstmeister/zookeeper ports: – 2181:2181 container_name: […]
-
Time:2021-1-31
1. Goroutine synchronization Why goroutine synchronization The concept of gorotine synchronization and several ways of synchronization 1.1 why goroutine synchronization is needed package main import ( “fmt” “sync” ) var A = 10 var wg = sync.WaitGroup{} func Add(){ defer wg.Done() for i:=0;i<1000000;i++{ A += 1 } } func main() { wg.Add(2) go Add() […]