Explain in detail two methods of RabbitMQ to realize delay message: dead letter queue + delay plug-in

1. Dead letter queue 1.1 when does the message become dead letter The message is not received and the consumer uses basic Reject or basic NACK, and the request callback queue property is set to false.The time of the message in the queue exceeds the expiration time (TTL) set for the message.The message queue reaches its maximum length and ...

Posted by aspekt9 on Mon, 16 May 2022 23:53:39 +0300

Git common commands

Git common commands New code base git clone Create a new Git repository in the current directory $ git init Create a new directory and initialize it as a Git repository $ git init [project-name] Download a project and its entire code history $ git clone [url] configure git config Git's setting file is .gitconfig, which can be in t ...

Posted by mr_tron on Mon, 16 May 2022 23:48:59 +0300

Design and implementation of database connection pool (Java version)

Wechat official account: Su Yanlun Integrate theory with practice and speak freely about technology and life. 1 Preface Database connection pool is a problem that must be faced and considered in the current system development. The principle is not complex, mainly to reduce the cost of repeatedly connecting to the database; Create the expected ...

Posted by pablocullen on Mon, 16 May 2022 23:44:56 +0300

Adapter mode of design mode

1 Overview Adapter mode: convert the interface of a class into another interface desired by the requirements, so that those classes that cannot work together due to interface incompatibility can work together classification The class adapter pattern class has a high degree of couplingObject Adapter Pattern 2 Structure The Adapter patt ...

Posted by MG-WebDesigns on Mon, 16 May 2022 22:58:25 +0300

CountDownLatch waiting for multithreading to complete (with examples)

Start sharpening to multithreading. This issue is a small example of CountDownLatch. Definition: CountDownLatch allows one or more threads to wait for other threads to complete operations. Example of application requirements: suppose there are four threads, A, B, C and D. thread D needs to be executed after A, B and C are executed. Application ...

Posted by kigroy on Mon, 16 May 2022 22:31:02 +0300

Bridge pattern of structural mode

definition: Separate the abstract part from its implementation part so that they can change independently. It is an object structure mode, also known as handle and body mode or interface mode. The bridge mode is similar to the multiple inheritance scheme, but the multiple inheritance scheme often violates the principle of single responsibilit ...

Posted by Loki on Mon, 16 May 2022 22:12:08 +0300

Design mode - eight different implementations of single case mode [JAVA] and single case question sorting - interview necessary - super detailed

Design mode - single case mode - eight different implementations [JAVA] and single case problem sorting - necessary for interview - super detailed Introduction to singleton mode the singleton pattern is a software design pattern that restricts the instantiation of a class to one "single" instance. It can be simply understood as: a class ca ...

Posted by SalokinX on Mon, 16 May 2022 21:13:29 +0300

Where are Java strings stored

In the morning, I saw the group of friends discussing the topic of where the Java string is. I was interested in the vegetable chicken who roughly witnessed the virtual machine, studied it and sorted out this blog Where does the string exist Here is a summary of what you agree: If you use a constant method, the object will be stored in th ...

Posted by wipe on Mon, 16 May 2022 20:48:52 +0300

New features of Java 9-11

1. Performance improvement Every time the JDK version is upgraded, the JVM speed will be improved. The performance improvement of jdk9-11 JVM is mainly reflected in garbage collection; garbage collector : The default configuration of java8 is UseParallelGC. The default value of the virtual machine running in Server mode. Use the collector ...

Posted by Nixon on Mon, 16 May 2022 19:22:18 +0300

Cache mechanism under Mybatis concurrency

Cache mechanism under Mybatis concurrency Mybatis level 1 and level 2 cache Level 1 cache: It is enabled by default. For multiple identical operations in a session, only the first time will go to the database to query, and then directly go to the cache to get the data! 1. Query the record for the first time, and write the queried data into th ...

Posted by miramichiphoto on Mon, 16 May 2022 18:49:30 +0300