You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by rth <ro...@gmail.com> on 2017/11/25 17:52:24 UTC

Artemis documentation

This is probably going to come off as whining. However, I hope the
maintainers of Artemis will take it in the spirit it is intended, as a
little (hopefully) constructive criticism.

From what I gather, Artemis is going to replace ActiveMQ at some point in
the future. If that is the case, I feel iike the project needs some work on
the documentation. I have a feeling that in its current state the
documentation may be a barrier to adoption.

Currently I am trying to see what it would take to update a project to use
Artemis. I think I'm going to be able to make it functional, but it seems to
be taking a lot longer than it should. I end up digging through source code
to see how to use features that the documentation merely hints about.

For example, I have lots of unit tests that use the vm protocol. That's easy
in ActiveMQ: using it to create a connection will start an embedded broker
if there is not one present already. it appears that is not the case with
Artemis, and I cannot figure out how to programatically start an embedded
server that handles the vm scheme. I just ended up using the tcp protocol
(and that was not particularly easy, either.)

Another example: I cannot figure out how to disable persistence in an
embedded broker, or even if it's possible. I am not using persistence, but
my broker is creating journal files.

A third example: I have no idea what most options are for
TransportConfigurations. TransportConstants seems to tell me what options I
can set, but I no clue what most of them are.




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Artemis documentation

Posted by Clebert Suconic <cl...@gmail.com>.
We have a package that can be used for unit tests only.
 On the iPhone now.  I can add more details on Monday or tomorrow maybe.

On Sat, Nov 25, 2017 at 7:46 PM Robert Huffman <ro...@gmail.com>
wrote:

> I use an embedded broker for unit tests, and that's the primary reason for
> wanting to create it programmatically. Currently I typically use a Fucked
> container for the broker in production.
>
>
>
> On Nov 25, 2017 12:22 PM, "Clebert Suconic" <cl...@gmail.com>
> wrote:
>
> > Are you using it embedded?
> >
> > Just trying to think what you are coming from. And focus where to improve
> > it.
> >
> > On Sat, Nov 25, 2017 at 12:52 PM rth <ro...@gmail.com> wrote:
> >
> > > This is probably going to come off as whining. However, I hope the
> > > maintainers of Artemis will take it in the spirit it is intended, as a
> > > little (hopefully) constructive criticism.
> > >
> > > From what I gather, Artemis is going to replace ActiveMQ at some point
> in
> > > the future. If that is the case, I feel iike the project needs some
> work
> > on
> > > the documentation. I have a feeling that in its current state the
> > > documentation may be a barrier to adoption.
> > >
> > > Currently I am trying to see what it would take to update a project to
> > use
> > > Artemis. I think I'm going to be able to make it functional, but it
> seems
> > > to
> > > be taking a lot longer than it should. I end up digging through source
> > code
> > > to see how to use features that the documentation merely hints about.
> > >
> > > For example, I have lots of unit tests that use the vm protocol. That's
> > > easy
> > > in ActiveMQ: using it to create a connection will start an embedded
> > broker
> > > if there is not one present already. it appears that is not the case
> with
> > > Artemis, and I cannot figure out how to programatically start an
> embedded
> > > server that handles the vm scheme. I just ended up using the tcp
> protocol
> > > (and that was not particularly easy, either.)
> > >
> > > Another example: I cannot figure out how to disable persistence in an
> > > embedded broker, or even if it's possible. I am not using persistence,
> > but
> > > my broker is creating journal files.
> > >
> > > A third example: I have no idea what most options are for
> > > TransportConfigurations. TransportConstants seems to tell me what
> > options I
> > > can set, but I no clue what most of them are.
> > >
> > >
> > >
> > >
> > > --
> > > Sent from:
> > > http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
> > >
> > --
> > Clebert Suconic
> >
>
-- 
Clebert Suconic

Re: Artemis documentation

Posted by Robert Huffman <ro...@gmail.com>.
I use an embedded broker for unit tests, and that's the primary reason for
wanting to create it programmatically. Currently I typically use a Fucked
container for the broker in production.



On Nov 25, 2017 12:22 PM, "Clebert Suconic" <cl...@gmail.com>
wrote:

> Are you using it embedded?
>
> Just trying to think what you are coming from. And focus where to improve
> it.
>
> On Sat, Nov 25, 2017 at 12:52 PM rth <ro...@gmail.com> wrote:
>
> > This is probably going to come off as whining. However, I hope the
> > maintainers of Artemis will take it in the spirit it is intended, as a
> > little (hopefully) constructive criticism.
> >
> > From what I gather, Artemis is going to replace ActiveMQ at some point in
> > the future. If that is the case, I feel iike the project needs some work
> on
> > the documentation. I have a feeling that in its current state the
> > documentation may be a barrier to adoption.
> >
> > Currently I am trying to see what it would take to update a project to
> use
> > Artemis. I think I'm going to be able to make it functional, but it seems
> > to
> > be taking a lot longer than it should. I end up digging through source
> code
> > to see how to use features that the documentation merely hints about.
> >
> > For example, I have lots of unit tests that use the vm protocol. That's
> > easy
> > in ActiveMQ: using it to create a connection will start an embedded
> broker
> > if there is not one present already. it appears that is not the case with
> > Artemis, and I cannot figure out how to programatically start an embedded
> > server that handles the vm scheme. I just ended up using the tcp protocol
> > (and that was not particularly easy, either.)
> >
> > Another example: I cannot figure out how to disable persistence in an
> > embedded broker, or even if it's possible. I am not using persistence,
> but
> > my broker is creating journal files.
> >
> > A third example: I have no idea what most options are for
> > TransportConfigurations. TransportConstants seems to tell me what
> options I
> > can set, but I no clue what most of them are.
> >
> >
> >
> >
> > --
> > Sent from:
> > http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
> >
> --
> Clebert Suconic
>

Re: Artemis documentation

Posted by Clebert Suconic <cl...@gmail.com>.
Are you using it embedded?

Just trying to think what you are coming from. And focus where to improve
it.

On Sat, Nov 25, 2017 at 12:52 PM rth <ro...@gmail.com> wrote:

> This is probably going to come off as whining. However, I hope the
> maintainers of Artemis will take it in the spirit it is intended, as a
> little (hopefully) constructive criticism.
>
> From what I gather, Artemis is going to replace ActiveMQ at some point in
> the future. If that is the case, I feel iike the project needs some work on
> the documentation. I have a feeling that in its current state the
> documentation may be a barrier to adoption.
>
> Currently I am trying to see what it would take to update a project to use
> Artemis. I think I'm going to be able to make it functional, but it seems
> to
> be taking a lot longer than it should. I end up digging through source code
> to see how to use features that the documentation merely hints about.
>
> For example, I have lots of unit tests that use the vm protocol. That's
> easy
> in ActiveMQ: using it to create a connection will start an embedded broker
> if there is not one present already. it appears that is not the case with
> Artemis, and I cannot figure out how to programatically start an embedded
> server that handles the vm scheme. I just ended up using the tcp protocol
> (and that was not particularly easy, either.)
>
> Another example: I cannot figure out how to disable persistence in an
> embedded broker, or even if it's possible. I am not using persistence, but
> my broker is creating journal files.
>
> A third example: I have no idea what most options are for
> TransportConfigurations. TransportConstants seems to tell me what options I
> can set, but I no clue what most of them are.
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
-- 
Clebert Suconic

Re: Artemis documentation

Posted by Justin Bertram <jb...@apache.org>.
> I feel iike the project needs some work on the documentation...

We're always looking to make things better.  The more specific the
suggestions the better.


> ...using it to create a connection will start an embedded broker if there
is not one present already.

That's correct.  Artemis doesn't support automatic broker creation/start
via the "vm" protocol.


> I cannot figure out how to programatically start an embedded server that
handles the vm scheme.

Have you take a look at the "embedded" or "embedded-simple" examples?  In
the former you can just change the TCP connector/acceptor to use the URL
"vm://0".  The later already uses the in-vm transport.

Also, there's a reference to a really simple JUnit test-case [1] in the
Hacking Guide that might be useful to you.  Although that uses helper
classes from the Artemis test-suite you can still use the code to determine
how to programmatically create a broker which supports the in-vm transport.


> I just ended up using the tcp protocol (and that was not particularly
easy, either.)

Creating a broker supporting the TCP transport should be as simple as this:

      ActiveMQServer server = ActiveMQServers.newActiveMQServer(new
ConfigurationImpl().addAcceptorConfiguration("tcp", "tcp://127.0.0.1:61616")
);
      server.start();


> I cannot figure out how to disable persistence in an embedded broker, or
even if it's possible.

It's possible
using org.apache.activemq.artemis.core.config.Configuration#setPersistenceEnabled.
Similar to the previous example:

      ActiveMQServer server = ActiveMQServers.newActiveMQServer(new
ConfigurationImpl().addAcceptorConfiguration("tcp", "tcp://127.0.0.1:61616
").setPersistenceEnabled(false));
      server.start();


>  I have no idea what most options are for TransportConfigurations.
TransportConstants seems to tell me what options I can set, but I no clue
what most of them are.

Have you consulted the documentation here [2]?


Justin

[1]
https://github.com/apache/activemq-artemis/blob/master/docs/hacking-guide/en/tests.md#writing-tests
[2]
http://activemq.apache.org/artemis/docs/latest/configuring-transports.html

On Sat, Nov 25, 2017 at 11:52 AM, rth <ro...@gmail.com> wrote:

> This is probably going to come off as whining. However, I hope the
> maintainers of Artemis will take it in the spirit it is intended, as a
> little (hopefully) constructive criticism.
>
> From what I gather, Artemis is going to replace ActiveMQ at some point in
> the future. If that is the case, I feel iike the project needs some work on
> the documentation. I have a feeling that in its current state the
> documentation may be a barrier to adoption.
>
> Currently I am trying to see what it would take to update a project to use
> Artemis. I think I'm going to be able to make it functional, but it seems
> to
> be taking a lot longer than it should. I end up digging through source code
> to see how to use features that the documentation merely hints about.
>
> For example, I have lots of unit tests that use the vm protocol. That's
> easy
> in ActiveMQ: using it to create a connection will start an embedded broker
> if there is not one present already. it appears that is not the case with
> Artemis, and I cannot figure out how to programatically start an embedded
> server that handles the vm scheme. I just ended up using the tcp protocol
> (and that was not particularly easy, either.)
>
> Another example: I cannot figure out how to disable persistence in an
> embedded broker, or even if it's possible. I am not using persistence, but
> my broker is creating journal files.
>
> A third example: I have no idea what most options are for
> TransportConfigurations. TransportConstants seems to tell me what options I
> can set, but I no clue what most of them are.
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>