[ 
https://issues.apache.org/jira/browse/ARTEMIS-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17050340#comment-17050340
 ] 

Clebert Suconic commented on ARTEMIS-1404:
------------------------------------------

We already have the in-memory journal. it's probably easy to use it.. but 
bootstrapping the testsuite seems a major task. (I'm not talking about 
complexity here.. but the ammount of lines to be changed).


we would need to find a clever way to minimize the number of lines changed. 
(perhaps on ActiveMQTestBase)

> In-memory Mode for Embedded Server
> ----------------------------------
>
>                 Key: ARTEMIS-1404
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-1404
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>          Components: Broker
>            Reporter: ocean
>            Priority: Major
>
> Problem
> We have several tests where we launch and use an embedded Artemis broker. In 
> order to make these tests faster we would like to run Artemis in a 
> "in-memory" mode where it writes no files to disk. The goal would be to start 
> a new broker, use it, and then shut it down without ever having written 
> anything to disk.
> Proposed Solution
> Based on my own internal research the easiest way to accomplish this would be 
> for Artemis to move to using the Java7 Path API [1] for interacting with the 
> disk. Then we could plug in jimfs [2] (an in-memory FileSystem provider) and 
> get the completely in-memory mode. The problem is that even when disabling 
> persistence Artemis still requires a java.io.File to specify its broker 
> directory:
> {code:java}
>                 ConfigurationImpl config = new ConfigurationImpl();
>               config.setPersistenceEnabled(false);
>               config.setBrokerInstance(new File("target/bus/artemis"));
> {code}
> If we could change this to take a Path instead of a File we would get 
> complete in-memory mode.
> [1] https://docs.oracle.com/javase/7/docs/api/java/nio/file/Path.html
> [2] https://github.com/google/jimfs



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to