You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by "ヤ艾枫o.--" <11...@qq.com> on 2021/06/08 06:36:13 UTC

I want to know something about dead letter queue with ActiveMQ 5.15.9

Hi:
When I set the expiration time for the message sent to the queue, when the expiration time is up, the message will be stored in the dead letter queue (ActiveMQ.DLQ)


With the same policy setting, the message will not enter the dead letter queue.


Does ActiveMQ itself not support storing expired topic messages into dead letter queues? Dead letter queue is only for queue?

回复: I want to know something about dead letter queue with ActiveMQ 5.15.9

Posted by "ヤ艾枫o.--" <11...@qq.com>.
Hi&nbsp;
My&nbsp; messages in the topic are non persistent messages. And&nbsp; the message will not enter the dead letter queue.
another things,When the messages in queue enter DLQ. From the console, I can only view the contents of 400 messages in the dead letter queue, although the actual number of messages is greater than 400


------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "users"                                                                                    <jb@nanthrax.net&gt;;
发送时间:&nbsp;2021年6月8日(星期二) 下午4:36
收件人:&nbsp;"users"<users@activemq.apache.org&gt;;

主题:&nbsp;Re: I want to know something about dead letter queue with ActiveMQ 5.15.9



Hi,

Maybe your messages in the topic (if I understand correctly) are non persistent messages.

By default, the non persistent messages are not store in the DLQ: only persistent messages go into the DLQ.

If you want to consider non persistent messages for DLQ, you have to enable it with something like (at destination policy level):

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <deadLetterStrategy&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <sharedDeadLetterStrategy processNonPersistent="true" /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </deadLetterStrategy&gt;

Regards
JB

&gt; Le 8 juin 2021 à 08:36, ヤ艾枫o.-- <1169114186@qq.com&gt; a écrit :
&gt; 
&gt; Hi:
&gt; When I set the expiration time for the message sent to the queue, when the expiration time is up, the message will be stored in the dead letter queue (ActiveMQ.DLQ)
&gt; 
&gt; 
&gt; With the same policy setting, the message will not enter the dead letter queue.
&gt; 
&gt; 
&gt; Does ActiveMQ itself not support storing expired topic messages into dead letter queues? Dead letter queue is only for queue?

RE: I want to know something about dead letter queue with ActiveMQ 5.15.9

Posted by "Dondorp, Erwin" <er...@cgi.com>.
Tim,

See https://activemq.apache.org/message-redelivery-and-dlq-handling#setting-expiration-on-messages-in-the-dlq

Erwin

-----Oorspronkelijk bericht-----
Van: Tim Bain <tb...@alumni.duke.edu> 
Verzonden: donderdag 10 juni 2021 13:55
Aan: ActiveMQ Users <us...@activemq.apache.org>
Onderwerp: Re: I want to know something about dead letter queue with ActiveMQ 5.15.9


EXTERNAL SENDER:   Do not click any links or open any attachments unless you trust the sender and know the content is safe.
EXPÉDITEUR EXTERNE:    Ne cliquez sur aucun lien et n’ouvrez aucune pièce jointe à moins qu’ils ne proviennent d’un expéditeur fiable, ou que vous ayez l'assurance que le contenu provient d'une source sûre.

If, after the messages expire, you connect a real consumer to the topic, does it receive those messages or does the broker expire them at that point?

How are you setting the expiration time on these messages?

For the web console, are you saying that this particular topic's enqueue counts (on the Topics tab of the web console) aren't increasing when you publish these messages?

Tim

On Tue, Jun 8, 2021, 8:38 PM ヤ艾枫o.-- <11...@qq.com> wrote:

> Hi
> My messages in the topic are persistent messages. And the message will 
> not enter the dead letter queue.
> Another things,When the messages in queue enter DLQ. From the console, 
> I can only view the contents of 400 messages in the dead letter queue, 
> although the actual number of messages is greater than 400
>
>
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人:
>                                                   "users"
>                                                                   < 
> jb@nanthrax.net&gt;;
> 发送时间:&nbsp;2021年6月8日(星期二) 下午4:36
> 收件人:&nbsp;"users"<users@activemq.apache.org&gt;;
>
> 主题:&nbsp;Re: I want to know something about dead letter queue with 
> ActiveMQ 5.15.9
>
>
>
> Hi,
>
> Maybe your messages in the topic (if I understand correctly) are non 
> persistent messages.
>
> By default, the non persistent messages are not store in the DLQ: only 
> persistent messages go into the DLQ.
>
> If you want to consider non persistent messages for DLQ, you have to 
> enable it with something like (at destination policy level):
>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> <deadLetterStrategy&gt; 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> <sharedDeadLetterStrategy processNonPersistent="true" /&gt; 
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
> </deadLetterStrategy&gt;
>
> Regards
> JB
>
> &gt; Le 8 juin 2021 à 08:36, ヤ艾枫o.-- <1169114186@qq.com&gt; a écrit :
> &gt;
> &gt; Hi:
> &gt; When I set the expiration time for the message sent to the queue, 
> when the expiration time is up, the message will be stored in the dead 
> letter queue (ActiveMQ.DLQ)
> &gt;
> &gt;
> &gt; With the same policy setting, the message will not enter the dead 
> letter queue.
> &gt;
> &gt;
> &gt; Does ActiveMQ itself not support storing expired topic messages 
> into dead letter queues? Dead letter queue is only for queue?

Re: I want to know something about dead letter queue with ActiveMQ 5.15.9

Posted by Tim Bain <tb...@alumni.duke.edu>.
If, after the messages expire, you connect a real consumer to the topic,
does it receive those messages or does the broker expire them at that point?

How are you setting the expiration time on these messages?

For the web console, are you saying that this particular topic's enqueue
counts (on the Topics tab of the web console) aren't increasing when you
publish these messages?

Tim

On Tue, Jun 8, 2021, 8:38 PM ヤ艾枫o.-- <11...@qq.com> wrote:

> Hi
> My messages in the topic are persistent messages. And the message will not
> enter the dead letter queue.
> Another things,When the messages in queue enter DLQ. From the console, I
> can only view the contents of 400 messages in the dead letter queue,
> although the actual number of messages is greater than 400
>
>
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人:
>                                                   "users"
>                                                                   <
> jb@nanthrax.net&gt;;
> 发送时间:&nbsp;2021年6月8日(星期二) 下午4:36
> 收件人:&nbsp;"users"<users@activemq.apache.org&gt;;
>
> 主题:&nbsp;Re: I want to know something about dead letter queue with
> ActiveMQ 5.15.9
>
>
>
> Hi,
>
> Maybe your messages in the topic (if I understand correctly) are non
> persistent messages.
>
> By default, the non persistent messages are not store in the DLQ: only
> persistent messages go into the DLQ.
>
> If you want to consider non persistent messages for DLQ, you have to
> enable it with something like (at destination policy level):
>
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <deadLetterStrategy&gt;
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
> <sharedDeadLetterStrategy processNonPersistent="true" /&gt;
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </deadLetterStrategy&gt;
>
> Regards
> JB
>
> &gt; Le 8 juin 2021 à 08:36, ヤ艾枫o.-- <1169114186@qq.com&gt; a écrit :
> &gt;
> &gt; Hi:
> &gt; When I set the expiration time for the message sent to the queue,
> when the expiration time is up, the message will be stored in the dead
> letter queue (ActiveMQ.DLQ)
> &gt;
> &gt;
> &gt; With the same policy setting, the message will not enter the dead
> letter queue.
> &gt;
> &gt;
> &gt; Does ActiveMQ itself not support storing expired topic messages into
> dead letter queues? Dead letter queue is only for queue?

回复: Use jolokia to read messages from the queue, up to 400 messages?

Posted by "ヤ艾枫o.--" <11...@qq.com>.
Thanks,After your explanation, there is really no need to read too much message content




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "users"                                                                                    <tbain@alumni.duke.edu&gt;;
发送时间:&nbsp;2021年6月16日(星期三) 晚上7:34
收件人:&nbsp;"ActiveMQ Users"<users@activemq.apache.org&gt;;

主题:&nbsp;Re: Use jolokia to read messages from the queue, up to 400 messages?



That matches my understanding: the queue browser is meant to be a way to
view small numbers of messages from among those that would be consumed
next, not a way to view every message in a huge queue.

If you need that ability, one option is to use the JDBC backing store type,
since then you can query the entire table at will. But there are tradeoffs
to that change (performance, cost, etc.), so you'll want to weigh whether
the ability to see all messages is worth it in light of those tradeoffs.

Tim

On Tue, Jun 15, 2021, 8:47 PM Justin Bertram <jbertram@apache.org&gt; wrote:

&gt;&nbsp; From what I can tell by looking at the source code [1], I don't believe
&gt; there is a way to get to the "next page." The maxBrowsePageSize looks to be
&gt; the absolute maximum number of messages you can browse administratively.
&gt;
&gt; Out of curiosity, why are you wanting to browse so many messages via
&gt; Jolokia?
&gt;
&gt;
&gt; Justin
&gt;
&gt; [1]
&gt;
&gt; https://github.com/apache/activemq/blob/ff1af27106c74ad930c5bd12e8c0159e522efb70/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java#L1172
&gt;
&gt; On Tue, Jun 15, 2021 at 9:29 PM ヤ艾枫o.-- <1169114186@qq.com&gt; wrote:
&gt;
&gt; &gt; Hi
&gt; &gt; Use jolokia to read messages from the queue, up to 400 messages.
&gt; &gt; After viewing some configurations, you can set the maximum message size
&gt; &gt; per page by setting maxBrowserPageSize,
&gt; &gt;
&gt; &gt;
&gt; &gt; But how to read the next page.
&gt; &gt;
&gt; &gt;
&gt; &gt; For example, when the same message size is 1000, when maxBrowserPageSize=
&gt; &gt; 500, you can view 0-500 messages, but how can I view 500-1000 messages
&gt; &gt; (messages on the next page)?
&gt;

Re: Use jolokia to read messages from the queue, up to 400 messages?

Posted by Tim Bain <tb...@alumni.duke.edu>.
That matches my understanding: the queue browser is meant to be a way to
view small numbers of messages from among those that would be consumed
next, not a way to view every message in a huge queue.

If you need that ability, one option is to use the JDBC backing store type,
since then you can query the entire table at will. But there are tradeoffs
to that change (performance, cost, etc.), so you'll want to weigh whether
the ability to see all messages is worth it in light of those tradeoffs.

Tim

On Tue, Jun 15, 2021, 8:47 PM Justin Bertram <jb...@apache.org> wrote:

>  From what I can tell by looking at the source code [1], I don't believe
> there is a way to get to the "next page." The maxBrowsePageSize looks to be
> the absolute maximum number of messages you can browse administratively.
>
> Out of curiosity, why are you wanting to browse so many messages via
> Jolokia?
>
>
> Justin
>
> [1]
>
> https://github.com/apache/activemq/blob/ff1af27106c74ad930c5bd12e8c0159e522efb70/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java#L1172
>
> On Tue, Jun 15, 2021 at 9:29 PM ヤ艾枫o.-- <11...@qq.com> wrote:
>
> > Hi
> > Use jolokia to read messages from the queue, up to 400 messages.
> > After viewing some configurations, you can set the maximum message size
> > per page by setting maxBrowserPageSize,
> >
> >
> > But how to read the next page.
> >
> >
> > For example, when the same message size is 1000, when maxBrowserPageSize=
> > 500, you can view 0-500 messages, but how can I view 500-1000 messages
> > (messages on the next page)?
>

Re: Use jolokia to read messages from the queue, up to 400 messages?

Posted by Justin Bertram <jb...@apache.org>.
 From what I can tell by looking at the source code [1], I don't believe
there is a way to get to the "next page." The maxBrowsePageSize looks to be
the absolute maximum number of messages you can browse administratively.

Out of curiosity, why are you wanting to browse so many messages via
Jolokia?


Justin

[1]
https://github.com/apache/activemq/blob/ff1af27106c74ad930c5bd12e8c0159e522efb70/activemq-broker/src/main/java/org/apache/activemq/broker/region/Queue.java#L1172

On Tue, Jun 15, 2021 at 9:29 PM ヤ艾枫o.-- <11...@qq.com> wrote:

> Hi
> Use jolokia to read messages from the queue, up to 400 messages.
> After viewing some configurations, you can set the maximum message size
> per page by setting maxBrowserPageSize,
>
>
> But how to read the next page.
>
>
> For example, when the same message size is 1000, when maxBrowserPageSize=
> 500, you can view 0-500 messages, but how can I view 500-1000 messages
> (messages on the next page)?

Use jolokia to read messages from the queue, up to 400 messages?

Posted by "ヤ艾枫o.--" <11...@qq.com>.
Hi
Use jolokia to read messages from the queue, up to 400 messages.
After viewing some configurations, you can set the maximum message size per page by setting maxBrowserPageSize,


But how to read the next page.


For example, when the same message size is 1000, when maxBrowserPageSize= 500, you can view 0-500 messages, but how can I view 500-1000 messages (messages on the next page)?

回复: I want to know something about dead letter queue with ActiveMQ 5.15.9

Posted by "ヤ艾枫o.--" <11...@qq.com>.
Hi
My messages in the topic are persistent messages. And the message will not enter the dead letter queue.
Another things,When the messages in queue enter DLQ. From the console, I can only view the contents of 400 messages in the dead letter queue, although the actual number of messages is greater than 400




------------------&nbsp;原始邮件&nbsp;------------------
发件人:                                                                                                                        "users"                                                                                    <jb@nanthrax.net&gt;;
发送时间:&nbsp;2021年6月8日(星期二) 下午4:36
收件人:&nbsp;"users"<users@activemq.apache.org&gt;;

主题:&nbsp;Re: I want to know something about dead letter queue with ActiveMQ 5.15.9



Hi,

Maybe your messages in the topic (if I understand correctly) are non persistent messages.

By default, the non persistent messages are not store in the DLQ: only persistent messages go into the DLQ.

If you want to consider non persistent messages for DLQ, you have to enable it with something like (at destination policy level):

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <deadLetterStrategy&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <sharedDeadLetterStrategy processNonPersistent="true" /&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </deadLetterStrategy&gt;

Regards
JB

&gt; Le 8 juin 2021 à 08:36, ヤ艾枫o.-- <1169114186@qq.com&gt; a écrit :
&gt; 
&gt; Hi:
&gt; When I set the expiration time for the message sent to the queue, when the expiration time is up, the message will be stored in the dead letter queue (ActiveMQ.DLQ)
&gt; 
&gt; 
&gt; With the same policy setting, the message will not enter the dead letter queue.
&gt; 
&gt; 
&gt; Does ActiveMQ itself not support storing expired topic messages into dead letter queues? Dead letter queue is only for queue?

Re: I want to know something about dead letter queue with ActiveMQ 5.15.9

Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,

Maybe your messages in the topic (if I understand correctly) are non persistent messages.

By default, the non persistent messages are not store in the DLQ: only persistent messages go into the DLQ.

If you want to consider non persistent messages for DLQ, you have to enable it with something like (at destination policy level):

         <deadLetterStrategy>
           <sharedDeadLetterStrategy processNonPersistent="true" />
         </deadLetterStrategy>

Regards
JB

> Le 8 juin 2021 à 08:36, ヤ艾枫o.-- <11...@qq.com> a écrit :
> 
> Hi:
> When I set the expiration time for the message sent to the queue, when the expiration time is up, the message will be stored in the dead letter queue (ActiveMQ.DLQ)
> 
> 
> With the same policy setting, the message will not enter the dead letter queue.
> 
> 
> Does ActiveMQ itself not support storing expired topic messages into dead letter queues? Dead letter queue is only for queue?