What version of the broker are you using and what version of the
documentation are you reading? Are you in the "bin" directory of your
Artemis home or your Artemis instance? Depending on which directory you're
in you'll have different commands available to you. My guess is that you're
in the home directory, not the instance directory.

The documentation is part of the code-base [1] so if you want to update
something just send a PR.

For any command which supports the --data option the format of the data is
100% dependent on the MessageSerializer [2] implementation specified via
the --serializer option. If no --serializer options is specified then the
default one is used (i.e. XMLMessageSerializer [3]) which uses a pretty
straight-forward XML format, e.g.:

  <?xml version="1.0"?>
  <messages>
     <message id="15" priority="4" expiration="0" timestamp="1659148913743"
type="text" user-id="2bd60e24-0fb1-11ed-893c-3ce1a1d12939">
        <properties>
           <property name="__AMQ_CID"
value="2bc32260-0fb1-11ed-893c-3ce1a1d12939" type="simple-string"/>
           <property name="_AMQ_ROUTING_TYPE" value="1" type="byte"/>
        </properties>
        <body>
           <![CDATA[3202149b-efb7-46f9-bc02-a2f0a523ee10]]>
        </body>
     </message>
     <message id="16" priority="4" expiration="0" timestamp="1659148913753"
type="text" user-id="2bd794c5-0fb1-11ed-893c-3ce1a1d12939">
        <properties>
           <property name="__AMQ_CID"
value="2bc32260-0fb1-11ed-893c-3ce1a1d12939" type="simple-string"/>
           <property name="_AMQ_ROUTING_TYPE" value="1" type="byte"/>
        </properties>
        <body>
           <![CDATA[72af769f-35e5-4f88-85b7-b21033238021]]>
        </body>
     </message>
  </messages>

If you use the producer command with --data then it will *read* messages
from the file, and if you use the consumer command it will write messages
to the file. Technically speaking you can specify --serializer with the
browse command but it won't actually do anything.


Justin

[1] https://github.com/apache/activemq-artemis/tree/main/docs
[2]
https://github.com/apache/activemq-artemis/blob/main/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/factory/serialize/MessageSerializer.java
[3]
https://github.com/apache/activemq-artemis/blob/main/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/factory/serialize/XMLMessageSerializer.java



On Fri, Jul 29, 2022 at 5:31 PM Stephen Baker <
stephen.ba...@rmssoftwareinc.com> wrote:

> It seems the documentation for the artemis cli tool is particularly out of
> date.
>
> The Data Tools page references the following subcommands of artemis data:
> print
> exp
> imp
> encode
> decode
> compact
> recover
>
> But only print and recover appear to exist.
>
> The Activation Tools documentation lists:
> artemis activation list and artemis activation set, but there is no
> activation subcommand.
>
> I’m currently trying to understand the artemis producer –data option, and
> what the expected file format is.
>
> How can I help contribute to the documentation for this tool / replacing
> outdated documentation?
> Can you help me use the artemis producer --data option?
> Are there any built in serializer options for ./artemis browse that would
> give me the data from an existing message (or any at all)?
>
> Stephen E. baker
>

Reply via email to