[
https://issues.apache.org/jira/browse/ARTEMIS-1404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17014772#comment-17014772
]
ocean commented on ARTEMIS-1404:
--------------------------------
We've managed to work around this but I still think it's the right way to go.
Our goal, for various reasons, has always been to have completely in-memory
tests that don't write to disk at all. (In fact in our CI platform there is no
disk to write to.) We get around this by having a directory for artemis be part
of our test image. It's annoying but not the end of the world. This feature is
a nice-to-have.
> 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)