You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Thai Le <ln...@gmail.com> on 2023/03/09 22:52:31 UTC

Artemis REST API

Hello,

Does the REST API still exist in the latest version? I do not see it in the
doc of 2.28.

Regards

Thai Le

Re: Artemis REST API

Posted by Robbie Gemmell <ro...@gmail.com>.
It was removed in 2.26.0 about 6 months ago, see details at
https://activemq.apache.org/components/artemis/documentation/latest/versions.html

On Thu, 9 Mar 2023 at 22:52, Thai Le <ln...@gmail.com> wrote:
>
> Hello,
>
> Does the REST API still exist in the latest version? I do not see it in the
> doc of 2.28.
>
> Regards
>
> Thai Le

Re: Artemis REST API

Posted by Justin Bertram <jb...@apache.org>.
The main thing to understand here is that broker management is based on JMX
MBeans. MBeans are available to manage essentially all of the broker's
resources (e.g. addresses, queues, bridges, acceptors, cluster-connections,
the broker itself, etc.). As required by JMX, each MBean has a unique name,
and these names follow a specific pattern and this pattern is hierarchical
for logical consistency and ease of use. For example, the broker's MBean
name follow the following pattern:

  org.apache.activemq.artemis:broker="<brokerName>"

Where <brokerName> is defined in broker.xml. Using the broker's name in the
MBean's name allows, for example, multiple brokers in the same JVM to be
managed via JMX.

Here are a couple other common patterns:

  - Address:
org.apache.activemq.artemis:broker="<brokerName>",component=addresses,address="<addressName>"
  - Queue:
org.apache.activemq.artemis:broker="<brokerName>",component=addresses,address="<addressName>",subcomponent=queues,routing-type="<routingType>",queue="<queueName>"

Once you know the name of the MBean you wish to interact with then you can
use the Jolokia protocol [1] to construct a URL to read attributes, write
attributes, or execute operations.

Hope that helps!


Justin

[1] https://jolokia.org/reference/html/protocol.html

On Thu, Mar 23, 2023 at 11:07 AM Thai Le <ln...@gmail.com> wrote:

> Thank you for the reference, i checked them but still confused about how to
> navigate between different Control classes. As i understand, this url
>
> http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\
> "0.0.0.0\"/QueueNames
> mean to execute the getQueueNames method but how do I know that it is
> executing on the ActiveMQServerControl class? The AddressControl class also
> has the getQueueNames method. What if I want to see the message count in
> queue Q of address A? I tried something like this:
>
> http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\
> "0.0.0.0\"/Address/A/Queue/Q/MessageCount
> but it did not work. Also, is it possible to browse messages as web console
> does?
>
> Thai Le
>
> On Thu, 23 Mar 2023 at 00:47, Domenico Francesco Bruscino <
> bruscinodf@gmail.com> wrote:
>
> > the partial list of the Management API MBeans is in the documentation[1],
> > i.e. to list the addresses you can use the getQueueNames method of
> > ActiveMQServerControl
> >
> > curl -v -H "Origin: http://localhost" -u admin:admin
> >
> >
> http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\
> > "0.0.0.0\"/QueueNames
> >
> > To learn about all available management operations, see the Javadoc for
> > these interfaces[2]. They are located in the
> > org.apache.activemq.artemis.api.core.management package and they are
> named
> > with the word Control at the end.
> >
> > [1]
> >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#the-management-api
> > [2]
> >
> >
> https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/management/package-summary.html
> >
> > On Wed, 22 Mar 2023 at 22:56, Thai Le <ln...@gmail.com> wrote:
> >
> > > Hi again,
> > > The example of the curl command to jolokia endpoint is fetching the
> > Version
> > > attribute of the org.apache.activemq.artemis:broker mbean, is there
> other
> > > mbean like address, queue, message that i can query?
> > >
> > > On Sat, 11 Mar 2023 at 11:28, Thai Le <ln...@gmail.com> wrote:
> > >
> > > > I was actually looking for the management API, thanks for pointing
> out
> > > the
> > > > differences. I'll look into jolokia endpoint.
> > > >
> > > > Thai Le
> > > >
> > > > On Sat, Mar 11, 2023, 10:28 Justin Bertram <jb...@apache.org>
> > wrote:
> > > >
> > > >> When you say "REST API" do you mean the REST *messaging* API or the
> > > >> REST-like *management* API?
> > > >>
> > > >> We still have the REST-like management API [1] which you can use to
> > get
> > > >> data from the broker like queue message counts, browse messages,
> etc.
> > > This
> > > >> API is provided via the Jolokia JMX-HTTP bridge which allows you to
> > > access
> > > >> the broker's JMX MBeans via HTTP.
> > > >>
> > > >>
> > > >> Justin
> > > >>
> > > >> [1]
> > > >>
> > > >>
> > >
> >
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia
> > > >>
> > > >> On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com>
> wrote:
> > > >>
> > > >> > Thank you for the detail explanation. I was looking for a quick
> way
> > to
> > > >> get
> > > >> > info about queues (number of messages avail, peak some
> messages...)
> > > for
> > > >> > debugging purpose. I guess I just need to make an stand alone app
> > and
> > > >> use
> > > >> > Java client to get those info.
> > > >> >
> > > >> > Thai Le
> > > >> >
> > > >> > On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org>
> > > wrote:
> > > >> >
> > > >> > > As Robbie noted, the REST interface was removed in 2.26.0. You
> can
> > > >> find
> > > >> > the
> > > >> > > original discussion regarding removal here [1].
> > > >> > >
> > > >> > > As I understand it, here are the essential reasons for removing
> > it:
> > > >> > >  - The dependencies had fallen woefully out-of-date and nobody
> was
> > > >> > willing
> > > >> > > to put in the effort to fix them since there were some breaking
> > > >> changes
> > > >> > > along the way.
> > > >> > >  - The STOMP protocol is ubiquitous, simple, standardized, and
> can
> > > be
> > > >> > used
> > > >> > > in almost every circumstance and environment where REST might be
> > > used.
> > > >> > >  - REST messaging is not portable because there's no standard
> > > >> messaging
> > > >> > API
> > > >> > > for REST. This is generally bad for users as it locks them in
> to a
> > > >> > specific
> > > >> > > broker.
> > > >> > >  - For simple use-cases (e.g. basic send & receive) it's easy
> > these
> > > >> days
> > > >> > to
> > > >> > > create your own REST interface and then implement messaging
> behind
> > > >> that.
> > > >> > > Since the REST interface is in the user's control then
> portability
> > > >> isn't
> > > >> > an
> > > >> > > issue.
> > > >> > >  - It's a bit of a pain to set up as it requires manually
> > building a
> > > >> WAR
> > > >> > > file. This wasn't a great user experience and limited adoption.
> > > >> > >
> > > >> > > You are, of course, still free to use the REST interface WAR
> from
> > > >> 2.25.0
> > > >> > > with any newer version.
> > > >> > >
> > > >> > >
> > > >> > > Justin
> > > >> > >
> > > >> > > [1]
> > > https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
> > > >> > >
> > > >> > > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com>
> > > wrote:
> > > >> > >
> > > >> > > > Hello,
> > > >> > > >
> > > >> > > > Does the REST API still exist in the latest version? I do not
> > see
> > > >> it in
> > > >> > > the
> > > >> > > > doc of 2.28.
> > > >> > > >
> > > >> > > > Regards
> > > >> > > >
> > > >> > > > Thai Le
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > >
> > > --
> > > Where there is will, there is a way
> > >
> >
>
>
> --
> Where there is will, there is a way
>

Re: Artemis REST API

Posted by Lachezar Dobrev <l....@gmail.com>.
  You can navigate the Artemis web console, and in the list of
'Operations' you can use the three-dots menu to 'Copy Jolokia URL'.
For an example the countMessages() method on the DQL can be called
with: http://172.17.0.2:8161/console/jolokia/exec/org.apache.activemq.artemis:broker=!%22broker!%22,component=addresses,address=!%22DLQ!%22,subcomponent=queues,routing-type=!%22anycast!%22,queue=!%22DLQ!%22/countMessages()

curl -u '...@...' -H 'Origin: ...'
'http://.../console/jolokia/.../countMessages()'
```
{
  "request": {
    "mbean": "org.apache.activemq.artemis:address=\"DLQ\",broker=\"broker\",component=addresses,queue=\"DLQ\",routing-type=\"anycast\",subcomponent=queues",
    "type": "exec",
    "operation": "countMessages()"
  },
  "value": 0,
  "timestamp": 1679588433,
  "status": 200
}
```

На чт, 23.03.2023 г. в 18:07 ч. Thai Le <ln...@gmail.com> написа:
>
> Thank you for the reference, i checked them but still confused about how to
> navigate between different Control classes. As i understand, this url
> http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\"/QueueNames
> mean to execute the getQueueNames method but how do I know that it is
> executing on the ActiveMQServerControl class? The AddressControl class also
> has the getQueueNames method. What if I want to see the message count in
> queue Q of address A? I tried something like this:
> http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\"/Address/A/Queue/Q/MessageCount
> but it did not work. Also, is it possible to browse messages as web console
> does?
>
> Thai Le
>
> On Thu, 23 Mar 2023 at 00:47, Domenico Francesco Bruscino <
> bruscinodf@gmail.com> wrote:
>
> > the partial list of the Management API MBeans is in the documentation[1],
> > i.e. to list the addresses you can use the getQueueNames method of
> > ActiveMQServerControl
> >
> > curl -v -H "Origin: http://localhost" -u admin:admin
> >
> > http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\
> > "0.0.0.0\"/QueueNames
> >
> > To learn about all available management operations, see the Javadoc for
> > these interfaces[2]. They are located in the
> > org.apache.activemq.artemis.api.core.management package and they are named
> > with the word Control at the end.
> >
> > [1]
> >
> > https://activemq.apache.org/components/artemis/documentation/latest/management.html#the-management-api
> > [2]
> >
> > https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/management/package-summary.html
> >
> > On Wed, 22 Mar 2023 at 22:56, Thai Le <ln...@gmail.com> wrote:
> >
> > > Hi again,
> > > The example of the curl command to jolokia endpoint is fetching the
> > Version
> > > attribute of the org.apache.activemq.artemis:broker mbean, is there other
> > > mbean like address, queue, message that i can query?
> > >
> > > On Sat, 11 Mar 2023 at 11:28, Thai Le <ln...@gmail.com> wrote:
> > >
> > > > I was actually looking for the management API, thanks for pointing out
> > > the
> > > > differences. I'll look into jolokia endpoint.
> > > >
> > > > Thai Le
> > > >
> > > > On Sat, Mar 11, 2023, 10:28 Justin Bertram <jb...@apache.org>
> > wrote:
> > > >
> > > >> When you say "REST API" do you mean the REST *messaging* API or the
> > > >> REST-like *management* API?
> > > >>
> > > >> We still have the REST-like management API [1] which you can use to
> > get
> > > >> data from the broker like queue message counts, browse messages, etc.
> > > This
> > > >> API is provided via the Jolokia JMX-HTTP bridge which allows you to
> > > access
> > > >> the broker's JMX MBeans via HTTP.
> > > >>
> > > >>
> > > >> Justin
> > > >>
> > > >> [1]
> > > >>
> > > >>
> > >
> > https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia
> > > >>
> > > >> On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com> wrote:
> > > >>
> > > >> > Thank you for the detail explanation. I was looking for a quick way
> > to
> > > >> get
> > > >> > info about queues (number of messages avail, peak some messages...)
> > > for
> > > >> > debugging purpose. I guess I just need to make an stand alone app
> > and
> > > >> use
> > > >> > Java client to get those info.
> > > >> >
> > > >> > Thai Le
> > > >> >
> > > >> > On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org>
> > > wrote:
> > > >> >
> > > >> > > As Robbie noted, the REST interface was removed in 2.26.0. You can
> > > >> find
> > > >> > the
> > > >> > > original discussion regarding removal here [1].
> > > >> > >
> > > >> > > As I understand it, here are the essential reasons for removing
> > it:
> > > >> > >  - The dependencies had fallen woefully out-of-date and nobody was
> > > >> > willing
> > > >> > > to put in the effort to fix them since there were some breaking
> > > >> changes
> > > >> > > along the way.
> > > >> > >  - The STOMP protocol is ubiquitous, simple, standardized, and can
> > > be
> > > >> > used
> > > >> > > in almost every circumstance and environment where REST might be
> > > used.
> > > >> > >  - REST messaging is not portable because there's no standard
> > > >> messaging
> > > >> > API
> > > >> > > for REST. This is generally bad for users as it locks them in to a
> > > >> > specific
> > > >> > > broker.
> > > >> > >  - For simple use-cases (e.g. basic send & receive) it's easy
> > these
> > > >> days
> > > >> > to
> > > >> > > create your own REST interface and then implement messaging behind
> > > >> that.
> > > >> > > Since the REST interface is in the user's control then portability
> > > >> isn't
> > > >> > an
> > > >> > > issue.
> > > >> > >  - It's a bit of a pain to set up as it requires manually
> > building a
> > > >> WAR
> > > >> > > file. This wasn't a great user experience and limited adoption.
> > > >> > >
> > > >> > > You are, of course, still free to use the REST interface WAR from
> > > >> 2.25.0
> > > >> > > with any newer version.
> > > >> > >
> > > >> > >
> > > >> > > Justin
> > > >> > >
> > > >> > > [1]
> > > https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
> > > >> > >
> > > >> > > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com>
> > > wrote:
> > > >> > >
> > > >> > > > Hello,
> > > >> > > >
> > > >> > > > Does the REST API still exist in the latest version? I do not
> > see
> > > >> it in
> > > >> > > the
> > > >> > > > doc of 2.28.
> > > >> > > >
> > > >> > > > Regards
> > > >> > > >
> > > >> > > > Thai Le
> > > >> > > >
> > > >> > >
> > > >> >
> > > >>
> > > >
> > >
> > > --
> > > Where there is will, there is a way
> > >
> >
>
>
> --
> Where there is will, there is a way

Re: Artemis REST API

Posted by Thai Le <ln...@gmail.com>.
Thank you for the reference, i checked them but still confused about how to
navigate between different Control classes. As i understand, this url
http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\"/QueueNames
mean to execute the getQueueNames method but how do I know that it is
executing on the ActiveMQServerControl class? The AddressControl class also
has the getQueueNames method. What if I want to see the message count in
queue Q of address A? I tried something like this:
http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\"0.0.0.0\"/Address/A/Queue/Q/MessageCount
but it did not work. Also, is it possible to browse messages as web console
does?

Thai Le

On Thu, 23 Mar 2023 at 00:47, Domenico Francesco Bruscino <
bruscinodf@gmail.com> wrote:

> the partial list of the Management API MBeans is in the documentation[1],
> i.e. to list the addresses you can use the getQueueNames method of
> ActiveMQServerControl
>
> curl -v -H "Origin: http://localhost" -u admin:admin
>
> http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\
> "0.0.0.0\"/QueueNames
>
> To learn about all available management operations, see the Javadoc for
> these interfaces[2]. They are located in the
> org.apache.activemq.artemis.api.core.management package and they are named
> with the word Control at the end.
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#the-management-api
> [2]
>
> https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/management/package-summary.html
>
> On Wed, 22 Mar 2023 at 22:56, Thai Le <ln...@gmail.com> wrote:
>
> > Hi again,
> > The example of the curl command to jolokia endpoint is fetching the
> Version
> > attribute of the org.apache.activemq.artemis:broker mbean, is there other
> > mbean like address, queue, message that i can query?
> >
> > On Sat, 11 Mar 2023 at 11:28, Thai Le <ln...@gmail.com> wrote:
> >
> > > I was actually looking for the management API, thanks for pointing out
> > the
> > > differences. I'll look into jolokia endpoint.
> > >
> > > Thai Le
> > >
> > > On Sat, Mar 11, 2023, 10:28 Justin Bertram <jb...@apache.org>
> wrote:
> > >
> > >> When you say "REST API" do you mean the REST *messaging* API or the
> > >> REST-like *management* API?
> > >>
> > >> We still have the REST-like management API [1] which you can use to
> get
> > >> data from the broker like queue message counts, browse messages, etc.
> > This
> > >> API is provided via the Jolokia JMX-HTTP bridge which allows you to
> > access
> > >> the broker's JMX MBeans via HTTP.
> > >>
> > >>
> > >> Justin
> > >>
> > >> [1]
> > >>
> > >>
> >
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia
> > >>
> > >> On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com> wrote:
> > >>
> > >> > Thank you for the detail explanation. I was looking for a quick way
> to
> > >> get
> > >> > info about queues (number of messages avail, peak some messages...)
> > for
> > >> > debugging purpose. I guess I just need to make an stand alone app
> and
> > >> use
> > >> > Java client to get those info.
> > >> >
> > >> > Thai Le
> > >> >
> > >> > On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org>
> > wrote:
> > >> >
> > >> > > As Robbie noted, the REST interface was removed in 2.26.0. You can
> > >> find
> > >> > the
> > >> > > original discussion regarding removal here [1].
> > >> > >
> > >> > > As I understand it, here are the essential reasons for removing
> it:
> > >> > >  - The dependencies had fallen woefully out-of-date and nobody was
> > >> > willing
> > >> > > to put in the effort to fix them since there were some breaking
> > >> changes
> > >> > > along the way.
> > >> > >  - The STOMP protocol is ubiquitous, simple, standardized, and can
> > be
> > >> > used
> > >> > > in almost every circumstance and environment where REST might be
> > used.
> > >> > >  - REST messaging is not portable because there's no standard
> > >> messaging
> > >> > API
> > >> > > for REST. This is generally bad for users as it locks them in to a
> > >> > specific
> > >> > > broker.
> > >> > >  - For simple use-cases (e.g. basic send & receive) it's easy
> these
> > >> days
> > >> > to
> > >> > > create your own REST interface and then implement messaging behind
> > >> that.
> > >> > > Since the REST interface is in the user's control then portability
> > >> isn't
> > >> > an
> > >> > > issue.
> > >> > >  - It's a bit of a pain to set up as it requires manually
> building a
> > >> WAR
> > >> > > file. This wasn't a great user experience and limited adoption.
> > >> > >
> > >> > > You are, of course, still free to use the REST interface WAR from
> > >> 2.25.0
> > >> > > with any newer version.
> > >> > >
> > >> > >
> > >> > > Justin
> > >> > >
> > >> > > [1]
> > https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
> > >> > >
> > >> > > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com>
> > wrote:
> > >> > >
> > >> > > > Hello,
> > >> > > >
> > >> > > > Does the REST API still exist in the latest version? I do not
> see
> > >> it in
> > >> > > the
> > >> > > > doc of 2.28.
> > >> > > >
> > >> > > > Regards
> > >> > > >
> > >> > > > Thai Le
> > >> > > >
> > >> > >
> > >> >
> > >>
> > >
> >
> > --
> > Where there is will, there is a way
> >
>


-- 
Where there is will, there is a way

Re: Artemis REST API

Posted by Domenico Francesco Bruscino <br...@gmail.com>.
the partial list of the Management API MBeans is in the documentation[1],
i.e. to list the addresses you can use the getQueueNames method of
ActiveMQServerControl

curl -v -H "Origin: http://localhost" -u admin:admin
http://localhost:8161/console/jolokia/read/org.apache.activemq.artemis:broker=\
"0.0.0.0\"/QueueNames

To learn about all available management operations, see the Javadoc for
these interfaces[2]. They are located in the
org.apache.activemq.artemis.api.core.management package and they are named
with the word Control at the end.

[1]
https://activemq.apache.org/components/artemis/documentation/latest/management.html#the-management-api
[2]
https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/management/package-summary.html

On Wed, 22 Mar 2023 at 22:56, Thai Le <ln...@gmail.com> wrote:

> Hi again,
> The example of the curl command to jolokia endpoint is fetching the Version
> attribute of the org.apache.activemq.artemis:broker mbean, is there other
> mbean like address, queue, message that i can query?
>
> On Sat, 11 Mar 2023 at 11:28, Thai Le <ln...@gmail.com> wrote:
>
> > I was actually looking for the management API, thanks for pointing out
> the
> > differences. I'll look into jolokia endpoint.
> >
> > Thai Le
> >
> > On Sat, Mar 11, 2023, 10:28 Justin Bertram <jb...@apache.org> wrote:
> >
> >> When you say "REST API" do you mean the REST *messaging* API or the
> >> REST-like *management* API?
> >>
> >> We still have the REST-like management API [1] which you can use to get
> >> data from the broker like queue message counts, browse messages, etc.
> This
> >> API is provided via the Jolokia JMX-HTTP bridge which allows you to
> access
> >> the broker's JMX MBeans via HTTP.
> >>
> >>
> >> Justin
> >>
> >> [1]
> >>
> >>
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia
> >>
> >> On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com> wrote:
> >>
> >> > Thank you for the detail explanation. I was looking for a quick way to
> >> get
> >> > info about queues (number of messages avail, peak some messages...)
> for
> >> > debugging purpose. I guess I just need to make an stand alone app and
> >> use
> >> > Java client to get those info.
> >> >
> >> > Thai Le
> >> >
> >> > On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org>
> wrote:
> >> >
> >> > > As Robbie noted, the REST interface was removed in 2.26.0. You can
> >> find
> >> > the
> >> > > original discussion regarding removal here [1].
> >> > >
> >> > > As I understand it, here are the essential reasons for removing it:
> >> > >  - The dependencies had fallen woefully out-of-date and nobody was
> >> > willing
> >> > > to put in the effort to fix them since there were some breaking
> >> changes
> >> > > along the way.
> >> > >  - The STOMP protocol is ubiquitous, simple, standardized, and can
> be
> >> > used
> >> > > in almost every circumstance and environment where REST might be
> used.
> >> > >  - REST messaging is not portable because there's no standard
> >> messaging
> >> > API
> >> > > for REST. This is generally bad for users as it locks them in to a
> >> > specific
> >> > > broker.
> >> > >  - For simple use-cases (e.g. basic send & receive) it's easy these
> >> days
> >> > to
> >> > > create your own REST interface and then implement messaging behind
> >> that.
> >> > > Since the REST interface is in the user's control then portability
> >> isn't
> >> > an
> >> > > issue.
> >> > >  - It's a bit of a pain to set up as it requires manually building a
> >> WAR
> >> > > file. This wasn't a great user experience and limited adoption.
> >> > >
> >> > > You are, of course, still free to use the REST interface WAR from
> >> 2.25.0
> >> > > with any newer version.
> >> > >
> >> > >
> >> > > Justin
> >> > >
> >> > > [1]
> https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
> >> > >
> >> > > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com>
> wrote:
> >> > >
> >> > > > Hello,
> >> > > >
> >> > > > Does the REST API still exist in the latest version? I do not see
> >> it in
> >> > > the
> >> > > > doc of 2.28.
> >> > > >
> >> > > > Regards
> >> > > >
> >> > > > Thai Le
> >> > > >
> >> > >
> >> >
> >>
> >
>
> --
> Where there is will, there is a way
>

Re: Artemis REST API

Posted by Thai Le <ln...@gmail.com>.
Hi again,
The example of the curl command to jolokia endpoint is fetching the Version
attribute of the org.apache.activemq.artemis:broker mbean, is there other
mbean like address, queue, message that i can query?

On Sat, 11 Mar 2023 at 11:28, Thai Le <ln...@gmail.com> wrote:

> I was actually looking for the management API, thanks for pointing out the
> differences. I'll look into jolokia endpoint.
>
> Thai Le
>
> On Sat, Mar 11, 2023, 10:28 Justin Bertram <jb...@apache.org> wrote:
>
>> When you say "REST API" do you mean the REST *messaging* API or the
>> REST-like *management* API?
>>
>> We still have the REST-like management API [1] which you can use to get
>> data from the broker like queue message counts, browse messages, etc. This
>> API is provided via the Jolokia JMX-HTTP bridge which allows you to access
>> the broker's JMX MBeans via HTTP.
>>
>>
>> Justin
>>
>> [1]
>>
>> https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia
>>
>> On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com> wrote:
>>
>> > Thank you for the detail explanation. I was looking for a quick way to
>> get
>> > info about queues (number of messages avail, peak some messages...) for
>> > debugging purpose. I guess I just need to make an stand alone app and
>> use
>> > Java client to get those info.
>> >
>> > Thai Le
>> >
>> > On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org> wrote:
>> >
>> > > As Robbie noted, the REST interface was removed in 2.26.0. You can
>> find
>> > the
>> > > original discussion regarding removal here [1].
>> > >
>> > > As I understand it, here are the essential reasons for removing it:
>> > >  - The dependencies had fallen woefully out-of-date and nobody was
>> > willing
>> > > to put in the effort to fix them since there were some breaking
>> changes
>> > > along the way.
>> > >  - The STOMP protocol is ubiquitous, simple, standardized, and can be
>> > used
>> > > in almost every circumstance and environment where REST might be used.
>> > >  - REST messaging is not portable because there's no standard
>> messaging
>> > API
>> > > for REST. This is generally bad for users as it locks them in to a
>> > specific
>> > > broker.
>> > >  - For simple use-cases (e.g. basic send & receive) it's easy these
>> days
>> > to
>> > > create your own REST interface and then implement messaging behind
>> that.
>> > > Since the REST interface is in the user's control then portability
>> isn't
>> > an
>> > > issue.
>> > >  - It's a bit of a pain to set up as it requires manually building a
>> WAR
>> > > file. This wasn't a great user experience and limited adoption.
>> > >
>> > > You are, of course, still free to use the REST interface WAR from
>> 2.25.0
>> > > with any newer version.
>> > >
>> > >
>> > > Justin
>> > >
>> > > [1] https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
>> > >
>> > > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com> wrote:
>> > >
>> > > > Hello,
>> > > >
>> > > > Does the REST API still exist in the latest version? I do not see
>> it in
>> > > the
>> > > > doc of 2.28.
>> > > >
>> > > > Regards
>> > > >
>> > > > Thai Le
>> > > >
>> > >
>> >
>>
>

-- 
Where there is will, there is a way

Re: Artemis REST API

Posted by Thai Le <ln...@gmail.com>.
I was actually looking for the management API, thanks for pointing out the
differences. I'll look into jolokia endpoint.

Thai Le

On Sat, Mar 11, 2023, 10:28 Justin Bertram <jb...@apache.org> wrote:

> When you say "REST API" do you mean the REST *messaging* API or the
> REST-like *management* API?
>
> We still have the REST-like management API [1] which you can use to get
> data from the broker like queue message counts, browse messages, etc. This
> API is provided via the Jolokia JMX-HTTP bridge which allows you to access
> the broker's JMX MBeans via HTTP.
>
>
> Justin
>
> [1]
>
> https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia
>
> On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com> wrote:
>
> > Thank you for the detail explanation. I was looking for a quick way to
> get
> > info about queues (number of messages avail, peak some messages...) for
> > debugging purpose. I guess I just need to make an stand alone app and use
> > Java client to get those info.
> >
> > Thai Le
> >
> > On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org> wrote:
> >
> > > As Robbie noted, the REST interface was removed in 2.26.0. You can find
> > the
> > > original discussion regarding removal here [1].
> > >
> > > As I understand it, here are the essential reasons for removing it:
> > >  - The dependencies had fallen woefully out-of-date and nobody was
> > willing
> > > to put in the effort to fix them since there were some breaking changes
> > > along the way.
> > >  - The STOMP protocol is ubiquitous, simple, standardized, and can be
> > used
> > > in almost every circumstance and environment where REST might be used.
> > >  - REST messaging is not portable because there's no standard messaging
> > API
> > > for REST. This is generally bad for users as it locks them in to a
> > specific
> > > broker.
> > >  - For simple use-cases (e.g. basic send & receive) it's easy these
> days
> > to
> > > create your own REST interface and then implement messaging behind
> that.
> > > Since the REST interface is in the user's control then portability
> isn't
> > an
> > > issue.
> > >  - It's a bit of a pain to set up as it requires manually building a
> WAR
> > > file. This wasn't a great user experience and limited adoption.
> > >
> > > You are, of course, still free to use the REST interface WAR from
> 2.25.0
> > > with any newer version.
> > >
> > >
> > > Justin
> > >
> > > [1] https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
> > >
> > > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com> wrote:
> > >
> > > > Hello,
> > > >
> > > > Does the REST API still exist in the latest version? I do not see it
> in
> > > the
> > > > doc of 2.28.
> > > >
> > > > Regards
> > > >
> > > > Thai Le
> > > >
> > >
> >
>

Re: Artemis REST API

Posted by Justin Bertram <jb...@apache.org>.
When you say "REST API" do you mean the REST *messaging* API or the
REST-like *management* API?

We still have the REST-like management API [1] which you can use to get
data from the broker like queue message counts, browse messages, etc. This
API is provided via the Jolokia JMX-HTTP bridge which allows you to access
the broker's JMX MBeans via HTTP.


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/latest/management.html#exposing-jmx-using-jolokia

On Sat, Mar 11, 2023 at 8:53 AM Thai Le <ln...@gmail.com> wrote:

> Thank you for the detail explanation. I was looking for a quick way to get
> info about queues (number of messages avail, peak some messages...) for
> debugging purpose. I guess I just need to make an stand alone app and use
> Java client to get those info.
>
> Thai Le
>
> On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org> wrote:
>
> > As Robbie noted, the REST interface was removed in 2.26.0. You can find
> the
> > original discussion regarding removal here [1].
> >
> > As I understand it, here are the essential reasons for removing it:
> >  - The dependencies had fallen woefully out-of-date and nobody was
> willing
> > to put in the effort to fix them since there were some breaking changes
> > along the way.
> >  - The STOMP protocol is ubiquitous, simple, standardized, and can be
> used
> > in almost every circumstance and environment where REST might be used.
> >  - REST messaging is not portable because there's no standard messaging
> API
> > for REST. This is generally bad for users as it locks them in to a
> specific
> > broker.
> >  - For simple use-cases (e.g. basic send & receive) it's easy these days
> to
> > create your own REST interface and then implement messaging behind that.
> > Since the REST interface is in the user's control then portability isn't
> an
> > issue.
> >  - It's a bit of a pain to set up as it requires manually building a WAR
> > file. This wasn't a great user experience and limited adoption.
> >
> > You are, of course, still free to use the REST interface WAR from 2.25.0
> > with any newer version.
> >
> >
> > Justin
> >
> > [1] https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
> >
> > On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com> wrote:
> >
> > > Hello,
> > >
> > > Does the REST API still exist in the latest version? I do not see it in
> > the
> > > doc of 2.28.
> > >
> > > Regards
> > >
> > > Thai Le
> > >
> >
>

Re: Artemis REST API

Posted by Thai Le <ln...@gmail.com>.
Thank you for the detail explanation. I was looking for a quick way to get
info about queues (number of messages avail, peak some messages...) for
debugging purpose. I guess I just need to make an stand alone app and use
Java client to get those info.

Thai Le

On Fri, Mar 10, 2023, 12:57 Justin Bertram <jb...@apache.org> wrote:

> As Robbie noted, the REST interface was removed in 2.26.0. You can find the
> original discussion regarding removal here [1].
>
> As I understand it, here are the essential reasons for removing it:
>  - The dependencies had fallen woefully out-of-date and nobody was willing
> to put in the effort to fix them since there were some breaking changes
> along the way.
>  - The STOMP protocol is ubiquitous, simple, standardized, and can be used
> in almost every circumstance and environment where REST might be used.
>  - REST messaging is not portable because there's no standard messaging API
> for REST. This is generally bad for users as it locks them in to a specific
> broker.
>  - For simple use-cases (e.g. basic send & receive) it's easy these days to
> create your own REST interface and then implement messaging behind that.
> Since the REST interface is in the user's control then portability isn't an
> issue.
>  - It's a bit of a pain to set up as it requires manually building a WAR
> file. This wasn't a great user experience and limited adoption.
>
> You are, of course, still free to use the REST interface WAR from 2.25.0
> with any newer version.
>
>
> Justin
>
> [1] https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp
>
> On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com> wrote:
>
> > Hello,
> >
> > Does the REST API still exist in the latest version? I do not see it in
> the
> > doc of 2.28.
> >
> > Regards
> >
> > Thai Le
> >
>

Re: Artemis REST API

Posted by Justin Bertram <jb...@apache.org>.
As Robbie noted, the REST interface was removed in 2.26.0. You can find the
original discussion regarding removal here [1].

As I understand it, here are the essential reasons for removing it:
 - The dependencies had fallen woefully out-of-date and nobody was willing
to put in the effort to fix them since there were some breaking changes
along the way.
 - The STOMP protocol is ubiquitous, simple, standardized, and can be used
in almost every circumstance and environment where REST might be used.
 - REST messaging is not portable because there's no standard messaging API
for REST. This is generally bad for users as it locks them in to a specific
broker.
 - For simple use-cases (e.g. basic send & receive) it's easy these days to
create your own REST interface and then implement messaging behind that.
Since the REST interface is in the user's control then portability isn't an
issue.
 - It's a bit of a pain to set up as it requires manually building a WAR
file. This wasn't a great user experience and limited adoption.

You are, of course, still free to use the REST interface WAR from 2.25.0
with any newer version.


Justin

[1] https://lists.apache.org/thread/qcdg5r1ytf0scr05b9wxyxg0stxgs5pp

On Thu, Mar 9, 2023 at 4:53 PM Thai Le <ln...@gmail.com> wrote:

> Hello,
>
> Does the REST API still exist in the latest version? I do not see it in the
> doc of 2.28.
>
> Regards
>
> Thai Le
>