ActiveMQApache ActiveMQhttps://blogs.apache.org/activemq/feed/entries/atom2020-02-21T11:01:49+00:00Apache Rollerhttps://blogs.apache.org/activemq/entry/new-activemq-logoNew ActiveMQ LogoClebert2017-07-19T21:09:32+00:002017-07-19T21:14:04+00:00<p>The ActiveMQ PMC is glad to announce the results of the call for logo vote.</p>
<p><b>The winner is.. with a total of 80 votes:</b></p>
<p>The ActiveMQ PMC is glad to announce the results of the call for logo vote.</p>
<p><b>The winner is.. with a total of 80 votes:</b></p>
<div><img src="https://github.com/apache/activemq/raw/master/docs/img/logo-1024.png" alt="Smiley face" height="165" width="512"></div>
<p>Thank you for all the 293 participants who helped making the selection, and for the 16 submissions</p>
<p>This was a great community experience!</p>https://blogs.apache.org/activemq/entry/actor-and-executorsActor and ExecutorsClebert2017-07-13T17:09:29+00:002017-07-13T17:09:29+00:00<p><i>Disclaimer:</i> I am talking about ActiveMQ Artemis internals here, giving tips on how you could achieve something similar on any system.</p>
<p>Systems today make heavy usage of Executors. No matter what system you chose, they are always there... Executors everywhere.</p>
<p>One pitfall they usually bring is: you will have to create one Runnable every time you call the executor:</p><p><i>Disclaimer:</i> I am talking about ActiveMQ Artemis internals here, giving tips on how you could achieve something similar on any system.</p>
<p>Systems today make heavy usage of Executors. No matter what system you chose, they are always there... Executors everywhere.</p>
<p>One pitfall they usually bring is: you will have to create one Runnable every time you call the executor:</p>
<pre>Executor executor; <span>// pretend this is already initialized
</span>
String data = <span>&quot;Hello world&quot;</span>;
executor.execute(<span>new</span> Runnable() <span>{</span>
System.out.println(data);
<span>}</span>);</pre>
<p>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)<p>
<p>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:<p>
<pre>Executor parentExecutor; <span>// pretend this is already initialized
</span>Actor&lt;String&gt; actor = <span>new</span> Actor&lt;&gt;(parentExecutor, ::onMessage);
<span>// this will call onMessage..
</span><span>// an executor will be used underneath but no new Runnables are created
</span>actor.act(<span>&quot;Hello world&quot;</span>);
<span>public</span> <span>void</span> onMessage(String message) <span>{</span>
System.out.println(message);
<span>}</span></pre>
<p>Look at the code yourself if you want to have a similar pattern on your system:</p>
<p>- <a href="https://github.com/apache/activemq-artemis/tree/713774361236d41de3a7ec5e4dbea87813fbad89/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/actors">Our commons packet</a></p>
<p>- <a href="https://github.com/apache/activemq-artemis/blob/713774361236d41de3a7ec5e4dbea87813fbad89/artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/core/ServerSessionPacketHandler.java#L249-L250">Code in use</a></p></p></p></p></p>https://blogs.apache.org/activemq/entry/call-for-vote-apache-activemqVote for the ActiveMQ new LogoClebert2017-07-10T17:45:08+00:002017-07-10T17:50:42+00:00<p>Vote for the new ActiveMQ Logo: <a href="https://goo.gl/forms/u5IPPfaQYnOo29g42">https://goo.gl/forms/u5IPPfaQYnOo29g42</a> </p>
<p> It is now the time to make <a href="https://goo.gl/forms/u5IPPfaQYnOo29g42">your choice</a> for the new ActiveMQ Logo</p>
<p>We have had a <a href="https://blogs.apache.org/roller-ui/authoring/preview/activemq/?previewEntry=apache-activemq-call-for-logo">call for vote last month</a>, and we own a big thanks for all the 18 submissions.</p>
<p>Please make your selection on this form: <a href="https://goo.gl/forms/u5IPPfaQYnOo29g42">https://goo.gl/forms/u5IPPfaQYnOo29g42</a> </p>
<p>The vote will be open until July-17th, 5 PM US EST time</p>https://blogs.apache.org/activemq/entry/apache-activemq-call-for-logoApache ActiveMQ Call For LogoClebert2017-06-01T14:16:22+00:002017-06-05T19:51:44+00:00<p><a href="http://activemq.apache.org/images/activemq-logo.png">The Apache ActiveMQ logo</a> was created a few years ago. While the project continues to evolve, the logo needs to be updated to reflect current ActiveMQ technology. So, the PMC has discussed making a “Call For Entry” where you can submit a new ActiveMQ Logo.</p>
<p><b>TL;DR:</b> Make your Apache ActiveMQ logo submissions as a PR with your files towards in this folder:
<a href="https://github.com/apache/activemq/tree/master/docs/img">https://github.com/apache/activemq/tree/master/docs/img</a></p><p><a href="http://activemq.apache.org/images/activemq-logo.png">The Apache ActiveMQ logo</a> was created a few years ago. While the project continues to evolve, the logo needs to be updated to reflect current ActiveMQ technology. So, the PMC has discussed making a “Call For Entry” where you can submit a new ActiveMQ Logo.</p>
<p><b>TL;DR:</b> Make your Apache ActiveMQ logo submissions as a PR with your files towards in this folder:
<a href="https://github.com/apache/activemq/tree/master/docs/img">https://github.com/apache/activemq/tree/master/docs/img</a></p>
<p>Current submissions will be seen as <a href="https://github.com/apache/activemq/pulls">Pull Requests</a>.</p>
<p>It’s basically a contest where you could win the possibility of saying: “I made that cool logo” :) Also you would get a big thanks from the Apache community.</p>
<p>Apache ActiveMQ is a fast and scalable Apache 2.0 licensed message broker. It’s built around standardized messaging protocols like AMQP 1.0 and MQTT, and standard APIs such as JMS. It’s an ideal fit for the messaging needs of a wide range of projects, from enterprise applications and integration solutions (in combination with Apache Camel) to Internet of Things.</p>
<p>Regardless of having your entry being selected or not, open source is a community experience, where your submission will be part of a bigger discussion. We are really looking forward to this experience and to know your art.</p>
The new Logo submission should have two versions:
<li>An Abstract image, representing ActiveMQ as a Messaging System (preferably square).</li>
<li>A Combined word ActiveMQ with the abstract image you created, like a banner style logo.</li>
<p>Also, it would be nice to have:</p>
<li> .png files to visualize the art you made.</li>
<li>Vector based files (.svg) so anyone would be able to work with the sources of the file and have the image looking nice on any scale.</li>
<br>
Make your submissions as a Pull Request with your files towards this folder:
<p><a href="https://github.com/apache/activemq/tree/master/docs/img">https://github.com/apache/activemq/tree/master/docs/img</a></p>
<p>If you are not familiar with git and github you can still attach your submission towards <a href="https://issues.apache.org/jira/browse/AMQ-6689">https://issues.apache.org/jira/browse/AMQ-6689</a></p>
The entry will be open for 30 days, until July 1st 2017, before we start a vote which will be open for 1 week.https://blogs.apache.org/activemq/entry/using-net-libraries-with-activemq.NET Applications and Artemis with AMQPClebert2017-02-04T04:39:14+00:002017-02-06T15:01:46+00:00<p>On this blog post I will give a quick tutorial on how to write a .NET client with Artemis, using the AMQP libraries and protocol</p><p>My first draft for this blog had a very extensive introduction about AMQP, its benefits, how business manager X would preserve its investment and blablablablaba...<p>
<p>Lets say I cut all that #@!# and I&#39;m jumping right to the good stuff:</p>
<p><b>AMQP is cool</b>, full of Libraries that you can bring to use with <b>ActiveMQ Artemis</b>.</p>
</p>One of the Libraries you can use is the <a href="https://github.com/Azure/amqpnetlite/">AMQPLite with .NET</a></p>
<p>If you just want to read the code, i have recently added the <a href="https://github.com/apache/activemq-artemis/tree/master/examples/protocols/amqp/dotnet">.NET Example on Artemis</a>, which is pretty much what I&#39;m describing here</p>
<p>Let me give you a cooking recipe on how to write a .NET application and Apache ActiveMQ Artemis</p>
<p>Let&#39;s do it!</p>
<p><b>Step 1</b> - Install .NET</p>
<p>There is this fun video explaining how to do it. My teenager daughter would definitely be able to follow this:
<br><a href="https://channel9.msdn.com/Blogs/dotnet/Get-started-with-VS-Code-using-CSharp-and-NET-Core">https://channel9.msdn.com/Blogs/dotnet/Get-started-with-VS-Code-using-CSharp-and-NET-Core</a></p>
<p>There is also a video showing how to do it on <a href="https://channel9.msdn.com/Blogs/dotnet/Get-started-with-VS-Code-using-CSharp-and-NET-Core-on-MacOS">Mac</a> and <a href="https://channel9.msdn.com/Blogs/dotnet/Get-started-with-VS-Code-Csharp-dotnet-Core-Ubuntu">Linux</a>
<p><b>Step 2</b> - Write the code
<p>I basically followed the steps here on this hello world app:
<br><a href="https://github.com/Azure/amqpnetlite/blob/master/docs/articles/hello_amqp.md">https://github.com/Azure/amqpnetlite/blob/master/docs/articles/hello_amqp.md</a></p>
<p>The main pitfall I had since I was very rusty on .NET was to install the AMQP.net library accordingly:</p>
<p>But I reckon it was my fault, although I could fix it in 10 min by adding this to the project.json:</p>
<pre>
&quot;dependencies&quot;: {&quot;AMQPNetLite&quot;: &quot;1.2.2&quot;},
</pre>
Here is the code I have:
<pre>
using System;
using Amqp;
namespace ConsoleApplication
{
public class Program
{
public static void Main(string[] args)
{
string address = &quot;amqp://a:a@localhost:5672&quot;;
Connection connection = new Connection(new Address(address));
Session session = new Session(connection);
SenderLink sender = new SenderLink(session, &quot;test-sender&quot;, &quot;q1&quot;);
Message message1 = new Message(&quot;Hello AMQP!&quot;);
sender.Send(message1);
Console.WriteLine(&quot;Message sent into queue q1&quot;);
}
}
}
</pre>
<p><b>Step 3</b> - Create an Artemis Broker and run it</p>
<p>./artemis create /tmp/myBroker</p>
<pre>
./artemis create /tmp/mybroker
Creating ActiveMQ Artemis instance at: /private/tmp/mybroker
--user: is a mandatory property!
Please provide the default username:
a
--password: is mandatory with this configuration:
Please provide the default password:
--role: is a mandatory property!
Please provide the default role:
a
--allow-anonymous | --require-login: is a mandatory property!
Allow anonymous access? (Y/N):
y
Auto tuning journal ...
done! Your system can make 25 writes per millisecond, your journal-buffer-timeout will be 40000
You can now start the broker by executing:
&quot;/private/tmp/mybroker/bin/artemis&quot; run
Or you can run the broker in the background using:
&quot;/private/tmp/mybroker/bin/artemis-service&quot; start
</pre>
<p>
<p><b>Finally:</b> run the thing:
<p># this will install dependencies<br>dotnet restore</p>
<pre>
log : Restoring packages for /work/apache/six/artemis-distribution/target/apache-artemis-2.0.0-SNAPSHOT-bin/apache-artemis-2.0.0-SNAPSHOT/examples/dotnet/amqp/queue/project.json...
log : Writing lock file to disk. Path: /work/apache/six/artemis-distribution/target/apache-artemis-2.0.0-SNAPSHOT-bin/apache-artemis-2.0.0-SNAPSHOT/examples/dotnet/amqp/queue/project.lock.json
log : /work/apache/six/artemis-distribution/target/apache-artemis-2.0.0-SNAPSHOT-bin/apache-artemis-2.0.0-SNAPSHOT/examples/dotnet/amqp/queue/project.json
log : Restore completed in 741ms.
</pre>
<p># this will run the code<br>dotnet run</p>
<pre>
Project dotnet (.NETCoreApp,Version=v1.1) will be compiled because expected outputs are missing
Compiling dotnet for .NETCoreApp,Version=v1.1
Compilation succeeded.
0 Warning(s)
0 Error(s)
Time elapsed 00:00:00.9060278
Message sent into queue q1
</pre>
<p>All of this can be done with both Artemis and ActiveMQ Classic </p>
<p>AMQP is a quite powerful and you can reuse your client libraries any way you want.</p>
</p></p></p></p>https://blogs.apache.org/activemq/entry/fast_messaging_with_artemisFast Messaging With Apache ActiveMQ ArtemisClebert2016-12-13T19:50:59+00:002016-12-13T20:05:40+00:00<p>ActiveMQ Artemis can be extremely fast in both transactional and non transactional cases.<p>
<p>This article will give you some hints on how to produce messages extremely fast with thousands messages per second in transactional mode.</p></p></p><h3>First, what is Apache ActiveMQ Artemis</h3>
<p>Apache Artemis is a sub project of ActiveMQ, where we are developing a new broker using 100% asynchronous back end. Messages are through a fast Journal Storage or through its Paging System when messages are beyond the capacity of the memory.</p>
<p>It was based on the donation from HornetQ, but it has evolved a lot since it joined the Apache ActiveMQ community, both evolving as a software and as an open source community</p>
<p>You can do either very fast messaging without using transactions, or you can use its mature transaction API (XA or regular transactions)</p>
<p>On this blog entry here I will cover how you can send thousands of messages per second by sending them asynchronously. Since there are many users interested in not using a transaction at all these days.</p>
<h3>
This is a guide to how to make your producers and consumers fly with Artemis</h3>
Many users have been using message systems that will favor performance instead of full guarantees of writes.<br>
<br>
This is something we have been doing for years with the Artemis codebase, including Artemis and previous versions of HornetQ.<br>
<br>
This is a small tutorial to do such thing with Artemis, pretty simple and quite powerful.<br>
<br>
This will make sender to be 100% asynchronous, So you never block the producer and you can easily make thousands messages / second.<br>
<br>
Even still the guarantees are quite high as the message will be persisted at the journal within milliseconds.<br>
<br>
So, here is how you do it:<br>
<h2>
<ul>
<li>Disable Block on Persistent Messages:</li>
</ul>
</h2>
There are two ways you can do that:<br>
<h4>
I - Disable blockOnDurableSend through a property:</h4>
<br>
<pre>ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
factory.setBlockOnDurableSend(false);
</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<h4>
II - Disable blockOnDurableSend through the URI for the connection Factory:</h4>
<pre>ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(&quot;tcp://localhost:61616?blockOnDurableSend=false);
</pre>
<pre></pre>
<pre></pre>
<h2>
<ul>
<li>Send non Transactionally:</li>
</ul>
</h2>
<div>
A transaction means a hard sync on the world. Make a round trip to the server and sync on disk.</div>
<div>
If you send a regular Persistent Message, asynchronously, then you get a large throughput on your producers.</div>
<div>
<br></div>
<div>
<br></div>
<div>
Here is a full example:</div>
<pre>package org.apache.activemq.artemis.cli.commands.messages;
import javax.jms.Connection;
import javax.jms.Destination;
import javax.jms.MessageProducer;
import javax.jms.Session;
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
import org.apache.activemq.artemis.jms.client.ActiveMQDestination;
public class FastProducer {
public static void main(String arg[]) {
try {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(&quot;tcp://localhost:61616?blockOnDurableSend=false&quot;);
Connection connection = factory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Destination queue = ActiveMQDestination.createDestination(&quot;queue://TEST&quot;, ActiveMQDestination.QUEUE_TYPE);
MessageProducer producer = session.createProducer(queue);
long time = System.currentTimeMillis();
for (int i = 0; i &lt; 100000; i++) {
producer.send(session.createTextMessage(&quot;hello guys&quot;));
}
System.out.println(&quot;Send message in &quot; + (System.currentTimeMillis() - time) + &quot; milliseconds&quot;);
connection.close();
}
catch (Exception e) {
}
}
}
</pre>
<pre></pre>
With this little example here<b> I am able to send 100K messages in less than 2 seconds</b> using my laptop.
<br>
<br>
<pre>Send message in 1772 milliseconds</pre>
<pre></pre>
<pre></pre>
<pre></pre>
<pre>And we are still improving things. Watch out for more improvements over the next month :)
</pre>