Thursday July 13, 2017

Actor and Executors

Disclaimer: I am talking about ActiveMQ Artemis internals here, giving tips on how you could achieve something similar on any system.

Systems today make heavy usage of Executors. No matter what system you chose, they are always there... Executors everywhere.

One pitfall they usually bring is: you will have to create one Runnable every time you call the executor:

Executor executor; // pretend this is already initialized

String data = "Hello world";
executor.execute(new Runnable() {

If you call this millions of time, you will have lots of Runnable instantiated that will need to be cleared by the Garbage Collector. (poor guy)

To make it easier, we haven recently introduce a new type of Executor on ActiveMQ Artemis internals. With the usage of lambdas it gets really elegant:

Executor parentExecutor; // pretend this is already initialized
Actor<String> actor = new Actor<>(parentExecutor, ::onMessage);

// this will call onMessage..
// an executor will be used underneath but no new Runnables are created
actor.act("Hello world");

public void onMessage(String message) {

Look at the code yourself if you want to have a similar pattern on your system:

- Our commons packet

- Code in use


Please explain why I would need to instantiate a new Executor for each execution.

Posted by Ken Geis on July 24, 2017 at 04:42 AM UTC #

I am looking forward for get new about the actor and executors try it for more informations.

Posted by 8 ball pool coins on October 10, 2017 at 08:58 AM UTC #

nice post Thanks for sharing. [url=][/url]

Posted by freexboxlivecodes on May 18, 2018 at 05:14 AM UTC #

I only recently started reading to such a famous book by Dan Brown as the Da Vinci Code, which is considered a classic of literature. The secret code is hidden in the works of Leonardo da Vinci ... Only he will help to find Christian shrines that give unthinkable power and power ... The key to the greatest mystery over which humanity has been beating for centuries can finally be found. If you need to write a paper on the topic of any work, you can ask for help here

Posted by Logan on July 20, 2018 at 09:50 AM UTC #

Copy and paste is common operation that we all are perform every day to move file and's copied to the so that you can paste somewhere else.

Posted by shyana on August 25, 2018 at 09:34 AM UTC #

Thanks for sharing this quality information with us. I really enjoyed reading. Will surely going to share this URL with my friends. <a href="></a>

Posted by driversin on August 26, 2018 at 06:07 AM UTC #

awesome post thanks for sharing.

Posted by freexboxcodes on September 07, 2018 at 06:18 AM UTC #

participate in the to win $100 giftcards.

Posted by surveys guy on September 17, 2018 at 06:18 AM UTC #

The easiest way to get free robux codes by using our robux generator. Made from scratch by our team,

Posted by jack8 on December 07, 2018 at 06:54 AM UTC #

Free Robux will be rewarded by completing simple offers.All your Robux will be rewarded to this account, make sure it's correct!

Posted by camas on December 07, 2018 at 06:55 AM UTC #

If you are not familiar with a company that you’re considering making an investment in, Kerrisdale Capital can help you get more information about the business. Sahm Adrangi is an expert on researching companies that you aren’t familiar with.

Posted by Vernon Lockett on December 08, 2018 at 10:55 AM UTC #

The blog is good. The article takes a look at the ActiveMQ. You can get to know about the ActiveMQ Artemis internals by reading the article. The article gives tips on how you could attain something similar on any system. If you read the article, you will recognize the benefits of the ActiveMQ.

Posted by Williamz terman on December 11, 2018 at 11:52 AM UTC #

Nice Post Sharing Thank You.

Posted by freevbucks on February 12, 2019 at 05:09 PM UTC #

The blog is good and it is about the Apache Software Foundation. The writer of the article talks about the ActiveMQ Artemis internals. He gives tips on how people could achieve something similar on any system.

Posted by davidsmith on February 18, 2019 at 06:10 AM UTC #

Amazing post. The tips related to ActiveMQ Artemis internals are very good

Posted by Harold N. Purcell on March 05, 2019 at 05:05 AM UTC #

Thanks for this content

Posted by Ricky on March 10, 2019 at 05:35 PM UTC #

Great article this is what I like

Posted by shadowss on March 12, 2019 at 10:21 AM UTC #

This is a masterpiece! What a genius idea.Thanks for the inspiration.

Posted by Paul on March 13, 2019 at 04:44 AM UTC #

Wow! Beautiful. I hope you had help.

Posted by Michelle on March 13, 2019 at 04:45 AM UTC #

I personally use them exclusively high-quality elements : you will notice these folks during:

Posted by yes movies on March 13, 2019 at 09:34 AM UTC #

I prefer merely excellent resources - you will see these people in:

Posted by 123movies 2019 on March 14, 2019 at 02:33 PM UTC #

Thanks a lot for one’s intriguing write-up. It’s actually exceptional. Searching ahead for this sort of revisions.

Posted by save money on March 16, 2019 at 08:03 PM UTC #

Particiate in mcdvoice survey to win free food.

Posted by mcdvoice on March 19, 2019 at 07:25 AM UTC #

Roblox Hack / Generator is free online hack tool. How to get free robux? The generator is made to generate free Robux for Roblox game. Cheat Roblox with our latest Roblox hack tool easy and fast. Click the button below and start generating unlimited Robux to your account now!

Posted by howtogetfreerobux on April 04, 2019 at 10:10 AM UTC #

Earn free Robux by completing tasks, doing offers, and watching videos!

Posted by freerobuxforkids on April 04, 2019 at 06:17 PM UTC #

You have posted a great tutorial which i like reading. I have learned a lot from this post which will help me in future.

Posted by on April 08, 2019 at 11:50 AM UTC #

Great content material and great layout. Your website deserves all of the positive feedback it’s been getting.

Posted by on April 11, 2019 at 07:39 PM UTC #

This is one of the finest tutorials I have gone through and for any kind of writing assistance you can check where a team of professional essay and technical writers are available on 24/7 basis.

Posted by John Smith on April 23, 2019 at 05:55 AM UTC #

Good , Really faster than RabbitMQ if deployed in a P2P architecture.

Posted by David Jhones on April 26, 2019 at 05:20 AM UTC #

Thanks for shareing this greate Information, Again Thank you. More info visit

Posted by Mohit kumar on May 04, 2019 at 04:18 PM UTC #

This is a mistrust to which there is not a apart answer. Namely, it all depends on the penis enlargement selection that you choose. In requital for instance, no one can articulate that penis enlargement surgery is risk-free.

Posted by Denis john on May 16, 2019 at 07:25 PM UTC #

Post a Comment:
  • HTML Syntax: NOT allowed



Hot Blogs (today's hits)

Tag Cloud