Tuesday, September 13, 2016

Artemis 1.4.0 Released

Artemis 1.4.0 has been released.

This is an epic release:

- Paging had a lot of improvements. you can have a max-size for the entire broker before the destinations will start to page.

- The producers will block when the disk is beyond a % limit. (Nice feature :) )

- When you kick clients, consumers will disconnect immediately (unless you configured reconnects on core protocol).

Check the sub project page:

Onward 1.5.0 now. I don't want to spoil the surprise but I am thinking of some nice things, that I will start adding JIRAs towards it :)

Tuesday, September 6, 2016

I am making a quick video on how to download and run an Artemis Broker.

On this video you will be able to hear me with my beautiful Brazilian-English accent.

Saturday, September 3, 2016

Epic change on Artemis 1.4.0 Coming up

I just sent an epic pull request towards ActiveMQ Artemis today.https://github.com/apache/activemq-artemis/pull/749

After this Artemis will monitor disk usage, and block or fail producers.

There is now a global limit for the server's memory before address start into page mode. Before you would need to specify the limit per address. Now you can have a global limit.

Besides this, artemis is getting into a nice shape for 1.4.0. I'm really excited about it coming up this week, and I should post a video or something this week on how to start a server.

Friday, May 14, 2010

Pointers in JNI / C++

When writing native code for Java (JNI), It's a common behaviour to store the pointer as long in a field in Java, and do a type-cast conversion on the native code back to the original pointer.

I did that on the native module on HornetQ, however this seems to eventually fail.

when using different bit sets as the target compilation (32 bits for instance) this seems to fail when you move back and forth.

The best way for that would be to use a Native Byte Buffer. This way you don't need to worry about conversions. You can just use a pointer back and forth:


In your Java class, you create this signature:

public class SomeClass
public native ByteBuffer initPointer();

And in your C++ code:

JNIEXPORT jobject JNICALL Java_SomeClass_initPointer
(JNIEnv * env, jobject obj)
return env->NewDirectByteBuffer(myPointer, 0); // size = 0, you don't want anyone to change it

Later, any C++ code can get back the pointer by doing:

return (MyClass *) env->GetDirectBufferAddress(myPointer);

I know the word pointer makes this a bit sour, but maybe it will be helpful to someone some day :-)

Wednesday, September 2, 2009

HornetQ and Maven

Andy Taylor has written a nice blog on how to use HornetQ on Maven. Very nice article:


Tuesday, August 11, 2009

Best Practice on Junit: Always set your fields to null on tearDown

This was a surprise to me today. Just wanted to share it thourgh a small blog entry, so maybe others are also going through the same thing.

Say you have this test:

public class MyTest extends TestCase

Server server;

public void setUp()
server = new Server();

public void testOne() throws Exception

public void testSecond() throws Exception

public void testThird() throws Exception

JUnit will hold one instance of MyTest for every method being executed. So if Server is a heavy weight object you will end up with three instances in the memory, until all the test methods on this class are executed.

So, as a best practice on unit tests aways set big objects such as server, connections or anything lilke that to null on a junit test.

Monday, July 27, 2009

JBoss Messaging 2.0 beta 4 is released

We just released Messaging 2.0 beta 4, and it' s ready to download.

I' m pleased with the progress we are making, and we are excited about what we are doing.

We still have work to do but we are very confident about the quality of the work we are doing.

Look at the documentation and you will know what I' m talking about.