You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by John Lilley <jo...@redpointglobal.com.INVALID> on 2022/11/04 16:53:43 UTC

Artemis: Enumerating messages without consuming them

In Artemis, using the management API (ClientRequestor, ManagementHelper), is there a way to browse the contents of a queue without consuming the messages?
We need more than just the count, we actually need to examine each message.
Thanks
John


[rg] <https://www.redpointglobal.com/>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint.

RE: Artemis: Enumerating messages without consuming them

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
Thanks!




[rg] <https://www.redpointglobal.com/>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Justin Bertram <jb...@apache.org>
Sent: Friday, November 4, 2022 1:12 PM
To: users@activemq.apache.org
Subject: Re: Artemis: Enumerating messages without consuming them

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

Yes, you could definitely use a JMS QueueBrowser. I didn't mention it because you were already using the core API. If you used the core JMS client then the QueueBrowser implementation would use the core API's browse-only consumer under the covers. The advantage with using JMS is that it's an API and you can swap out implementations if you ever need/want to (e.g. if you switched brokers). The disadvantage is that it adds more dependencies to your code (although that might not be significant for your use-case).


Justin


On Fri, Nov 4, 2022 at 2:03 PM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
Thanks!

I also see that I could use a JMS QueueBrowser.  Is there an advantage to one over the other?

John



[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,xaoLQp2Yy2H-eK5cWrE_GT_SFrLKNWlE8ShaPo0qwquN4pmDIXCh9Sqo6X2yYH5oxgtRw3R9OqFRUfN5Fy9iZcO9wi9iteFv9aYV7I5N8pemZngzzbFIISTn9wjz&typo=1>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Justin Bertram <jb...@apache.org>>
Sent: Friday, November 4, 2022 11:14 AM
To: users@activemq.apache.org<ma...@activemq.apache.org>
Subject: Re: Artemis: Enumerating messages without consuming them

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

It is possible to browse the messages of a queue using the management API. This is what the web console does when it displays the messages in a queue. However, if you're using the core API then the most straight-forward way to browse messages on a queue is with a browse-only consumer (e.g. using o.a.a.a.a.c.c.ClientSession#createConsumer(SimpleString, boolean) [1]).


Justin

[1] https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/client/ClientSession.html#createConsumer(org.apache.activemq.artemis.api.core.SimpleString,boolean)

On Fri, Nov 4, 2022 at 11:54 AM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
In Artemis, using the management API (ClientRequestor, ManagementHelper), is there a way to browse the contents of a queue without consuming the messages?
We need more than just the count, we actually need to examine each message.
Thanks
John


<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

John Lilley <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

Data Management Chief Architect, Redpoint Global Inc. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

888 Worcester Street, Suite 200 Wellesley, MA 02482 <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

M: +1 7209385761 | john.lilley@redpointglobal.com <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint. <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint.

Re: Artemis: Enumerating messages without consuming them

Posted by Justin Bertram <jb...@apache.org>.
Yes, you could definitely use a JMS QueueBrowser. I didn't mention it
because you were already using the core API. If you used the core JMS
client then the QueueBrowser implementation would use the core API's
browse-only consumer under the covers. The advantage with using JMS is that
it's an API and you can swap out implementations if you ever need/want to
(e.g. if you switched brokers). The disadvantage is that it adds more
dependencies to your code (although that might not be significant for your
use-case).


Justin


On Fri, Nov 4, 2022 at 2:03 PM John Lilley
<jo...@redpointglobal.com.invalid> wrote:

> Thanks!
>
>
>
> I also see that I could use a JMS QueueBrowser.  Is there an advantage to
> one over the other?
>
>
>
> John
>
>
>
>
> [image: rg] <https://www.redpointglobal.com/>
>
> John Lilley
>
> Data Management Chief Architect, Redpoint Global Inc.
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> *From:* Justin Bertram <jb...@apache.org>
> *Sent:* Friday, November 4, 2022 11:14 AM
> *To:* users@activemq.apache.org
> *Subject:* Re: Artemis: Enumerating messages without consuming them
>
>
>
> **** [Caution] This email is from an external source. Please use caution
> responding, opening attachments or clicking embedded links. ****
>
>
>
> It is possible to browse the messages of a queue using the management API.
> This is what the web console does when it displays the messages in a queue.
> However, if you're using the core API then the most straight-forward way to
> browse messages on a queue is with a browse-only consumer (e.g. using
> o.a.a.a.a.c.c.ClientSession#createConsumer(SimpleString, boolean) [1]).
>
>
>
>
>
> Justin
>
>
>
> [1]
> https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/client/ClientSession.html#createConsumer(org.apache.activemq.artemis.api.core.SimpleString,boolean)
>
>
>
> On Fri, Nov 4, 2022 at 11:54 AM John Lilley <
> john.lilley@redpointglobal.com.invalid> wrote:
>
> In Artemis, using the management API (ClientRequestor, ManagementHelper),
> is there a way to browse the contents of a queue without consuming the
> messages?
>
> We need more than just the count, we actually need to examine each message.
>
> Thanks
>
> John
>
>
>
> [image: rg]
> <https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>
>
> *John Lilley *
>
> *Data Management Chief Architect, Redpoint Global Inc. *
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
>
> PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is
> confidential and is intended solely for the use of the individual(s) to
> whom it is addressed. If you believe you received this e-mail in error,
> please notify the sender immediately, delete the e-mail from your computer
> and do not copy, print or disclose it to anyone else. If you properly
> received this e-mail as a customer, partner or vendor of Redpoint, you
> should maintain its contents in confidence subject to the terms and
> conditions of your agreement(s) with Redpoint.
>
>
> PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is
> confidential and is intended solely for the use of the individual(s) to
> whom it is addressed. If you believe you received this e-mail in error,
> please notify the sender immediately, delete the e-mail from your computer
> and do not copy, print or disclose it to anyone else. If you properly
> received this e-mail as a customer, partner or vendor of Redpoint, you
> should maintain its contents in confidence subject to the terms and
> conditions of your agreement(s) with Redpoint.
>

RE: Artemis: Enumerating messages without consuming them

Posted by John Lilley <jo...@redpointglobal.com.INVALID>.
Thanks!

I also see that I could use a JMS QueueBrowser.  Is there an advantage to one over the other?

John




[rg] <https://www.redpointglobal.com/>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>
From: Justin Bertram <jb...@apache.org>
Sent: Friday, November 4, 2022 11:14 AM
To: users@activemq.apache.org
Subject: Re: Artemis: Enumerating messages without consuming them

*** [Caution] This email is from an external source. Please use caution responding, opening attachments or clicking embedded links. ***

It is possible to browse the messages of a queue using the management API. This is what the web console does when it displays the messages in a queue. However, if you're using the core API then the most straight-forward way to browse messages on a queue is with a browse-only consumer (e.g. using o.a.a.a.a.c.c.ClientSession#createConsumer(SimpleString, boolean) [1]).


Justin

[1] https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/client/ClientSession.html#createConsumer(org.apache.activemq.artemis.api.core.SimpleString,boolean)

On Fri, Nov 4, 2022 at 11:54 AM John Lilley <jo...@redpointglobal.com.invalid>> wrote:
In Artemis, using the management API (ClientRequestor, ManagementHelper), is there a way to browse the contents of a queue without consuming the messages?
We need more than just the count, we actually need to examine each message.
Thanks
John


[rg]<https://linkprotect.cudasvc.com/url?a=https%3a%2f%2fwww.redpointglobal.com%2f&c=E,1,Z61Xc09O-I4l27VHFnNq96QpcUBxTF0IYTj57GPq23UA6RGVQEBLOhtFqqI-eZuw77obzNkogzIlfFgJVP0IA8XntaV2HHUwkoVCSMw1pw,,&typo=1>

John Lilley

Data Management Chief Architect, Redpoint Global Inc.

888 Worcester Street, Suite 200 Wellesley, MA 02482

M: +1 7209385761<tel:+1%207209385761> | john.lilley@redpointglobal.com<ma...@redpointglobal.com>

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint.

PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is confidential and is intended solely for the use of the individual(s) to whom it is addressed. If you believe you received this e-mail in error, please notify the sender immediately, delete the e-mail from your computer and do not copy, print or disclose it to anyone else. If you properly received this e-mail as a customer, partner or vendor of Redpoint, you should maintain its contents in confidence subject to the terms and conditions of your agreement(s) with Redpoint.

Re: Artemis: Enumerating messages without consuming them

Posted by Justin Bertram <jb...@apache.org>.
It is possible to browse the messages of a queue using the management API.
This is what the web console does when it displays the messages in a queue.
However, if you're using the core API then the most straight-forward way to
browse messages on a queue is with a browse-only consumer (e.g. using
o.a.a.a.a.c.c.ClientSession#createConsumer(SimpleString, boolean) [1]).


Justin

[1]
https://activemq.apache.org/components/artemis/documentation/javadocs/javadoc-latest/org/apache/activemq/artemis/api/core/client/ClientSession.html#createConsumer(org.apache.activemq.artemis.api.core.SimpleString,boolean)

On Fri, Nov 4, 2022 at 11:54 AM John Lilley
<jo...@redpointglobal.com.invalid> wrote:

> In Artemis, using the management API (ClientRequestor, ManagementHelper),
> is there a way to browse the contents of a queue without consuming the
> messages?
>
> We need more than just the count, we actually need to examine each message.
>
> Thanks
>
> John
>
> [image: rg] <https://www.redpointglobal.com/>
>
> John Lilley
>
> Data Management Chief Architect, Redpoint Global Inc.
>
> 888 Worcester Street, Suite 200 Wellesley, MA 02482
>
> *M: *+1 7209385761 <+1%207209385761> | john.lilley@redpointglobal.com
>
> PLEASE NOTE: This e-mail from Redpoint Global Inc. (“Redpoint”) is
> confidential and is intended solely for the use of the individual(s) to
> whom it is addressed. If you believe you received this e-mail in error,
> please notify the sender immediately, delete the e-mail from your computer
> and do not copy, print or disclose it to anyone else. If you properly
> received this e-mail as a customer, partner or vendor of Redpoint, you
> should maintain its contents in confidence subject to the terms and
> conditions of your agreement(s) with Redpoint.
>