RocketMQ provides many API s for pulling messages in PullConsumer, but in general there are two kinds: synchronous and asynchronous message pulling.
Synchronized message pull-outThe pullSyncImpl method of DefaultMQPullConsumerImpl is used to pull and cancel messages synchronously:
1 private PullResult pullSyncImpl(MessageQueue mq, Subscrip ...
Posted on Tue, 13 Aug 2019 05:35:01 -0700 by ainoy31
Unsafe is a class located under the sun.misc package. It mainly provides some methods to perform low-level, unsafe operations, such as direct access to system memory resources, self-management of memory resources, and so on. These methods have played a significant role in improving Java efficiency and enhancing the operation capabilities of Jav ...
Posted on Sat, 10 Aug 2019 23:44:40 -0700 by Simmo
The source code for ThreadLocal was discussed in the previous section, so let's look at FastThreadLocal in this section.I think it's simpler than ThreadLocal because it's more efficient due to the lack of cleanup and cleanup of Entry.
Like ThreadLocal, we'll start with a structure diagram:
See how this diagram differs from ThreadLocal by ...
Posted on Sun, 04 Aug 2019 10:48:05 -0700 by tllewellyn
Memory specifications for memory pools:
In the previous source code analysis process, we should have some impressions about the size of memory specifications. In fact, there are four main sizes of memory in Netty memory pool: tiny refers to the size between 0-512Byte, small refers to the size between 512Byte-8KB, normal refers to the size betw ...
Posted on Thu, 01 Aug 2019 21:48:03 -0700 by RogerInHawaii
Links to the original text
Exporter is exposed after service provider initialization is completed. After the service consumer initialization is completed, the Proxy proxy is obtained, and the proxy is invoked when the method is invoked.
After service consumers are initialized, a dynamic proxy class, Invoker Invocation Handler, contains MockClus ...
Posted on Tue, 16 Jul 2019 10:37:06 -0700 by bex1111
First of all, we must know that Tcp sticks and unpacks. TCP is a "stream" protocol. The so-called stream is a series of data without boundaries. The underlying layer of TCP does not understand the specific meaning of the upper layer business data. It divides the packets according to the actual data of the TCP buffer. A complete packag ...
Posted on Tue, 09 Jul 2019 14:41:53 -0700 by verano
netty Server Start-Server Bootstrap Source Parsing
In the first article, I analyzed the parameter setting and start-up process of Bootstrap, which is the boot class of netty client in spark. Obviously, we still have another important part - the initialization and startup process of the server side has not been explored, so in this section, we w ...
Posted on Sat, 29 Jun 2019 12:36:44 -0700 by Alkimuz
1. Review the sticking/unpacking first.
1.1. The Meaning of Packing/Unpacking
TCP is a "flow" protocol. It does not understand the specific meaning of the upper business data. It divides the packets according to the actual situation of the TCP buffer. So in business, it is believed that a complete package may be divided into several ...
Posted on Wed, 26 Jun 2019 10:56:49 -0700 by dgx
Using Channel Future and Channel Promise to handle asynchronous operations in Netty
This is the official Channel Futur description.
1 * | Completed successfully |
2 * +---------------------------+
3 * +----> isDone() ...
Posted on Sun, 02 Jun 2019 16:36:43 -0700 by manhattanpaul
What is protocol buffers
Protobuf is a platform-independent, language-independent, scalable and efficient protocol for serialized data structures, which can be used for network communication and data storage.
Introduction to Protobuf
1. Construction of development environment
The latest official version of protobuf is now ...
Posted on Wed, 15 May 2019 10:54:55 -0700 by microbluechip