ClientReliableTopicConfig function ( int arg0 ) { this . readBatchSize = checkPositive ( arg0 , "srini_string" ) ; return this ; }
sets the read batch size . the reliabletopic tries to read a batch of messages from the ringbuffer . it will get at least one , but if there are more available , then it will try to get more to increase throughput . the minimal read batch size can be influenced using the read batch size . apart from influencing the number of messages to download , the readbatchsize also determines how many messages will be processed by the thread running the messagelistener before it returns back to the pool to look for other messagelisteners that need to be processed . the problem with returning to the pool and looking for new work is that interacting with an executor is quite expensive due to contention on the work-queue . the more work that can be done without retuning to the pool , the smaller the overhead . if the readbatchsize is 10 and there are 50 messages available , 10 items are retrieved and processed consecutively before the thread goes back to the pool and helps out with the processing of other messages . if the readbatchsize is 10 and there are 2 items available , 2 items are retrieved and processed consecutively . if the readbatchsize is an issue because a thread will be busy too long with processing a single messagelistener and it ca n't help out other messagelisteners , increase the size of the threadpool so the other messagelisteners do n't need to wait for a thread , but can be processed in parallel . concode_field_sep int DEFAULT_READ_BATCH_SIZE concode_elem_sep TopicOverloadPolicy topicOverloadPolicy concode_elem_sep TopicOverloadPolicy DEFAULT_TOPIC_OVERLOAD_POLICY concode_elem_sep Executor executor concode_elem_sep int readBatchSize concode_elem_sep String name concode_field_sep TopicOverloadPolicy getTopicOverloadPolicy concode_elem_sep ClientReliableTopicConfig setTopicOverloadPolicy concode_elem_sep String getName concode_elem_sep Executor getExecutor concode_elem_sep String toString concode_elem_sep ClientReliableTopicConfig setExecutor concode_elem_sep int getReadBatchSize