ocean created ARTEMIS-1404:
------------------------------
Summary: 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
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.
Notes
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
(v6.4.14#64029)