[prev in list] [next in list] [prev in thread] [next in thread] 

List:       activemq-users
Subject:    Re: Need support for STOMP with node js
From:       Saurabh Singh <singhsaurabh1622000 () gmail ! com>
Date:       2023-11-15 12:43:58
Message-ID: CANVRXSuSNOJwdUr9peDOjWDhLaFzMKc2O-gB=PMgGza2jNzsEQ () mail ! gmail ! com
[Download RAW message or body]


Hi Team,

Thanks Matt and Justin for your valuable response and sorry for the
confusion. I'll try again to mention my scenarios in detail.

*I am using ActiveMq classic, in my node js project.*

My application has implemented many queues (more than 50). each queue has
its own configuration like this


   1. customer = {"q": "customer", "w": "http://localhost:3007", "delay":
   1800, "d": 300, "retry": 10}

Consider this, where *q *is the queueName, *w *is the endpoint where this
queue should post the message (consumer endpoint), *delay *and *d* is
something by which we are calculating the delay for the next retry if the
message processing fails in the first attempt, basically the delay will be
increased as well as the retry count will increase. and the *retry *is the
maximum retry count for this queue for any message. So here if the retry
increases by 10 then we will not process that message again simply we will
delete that.


Now My only question is, there is something known as JMSXDeliveryCount for
retry count,(I saw it in the web console) that is not coming in the message
header via STOMP protocol, is there any way by which I can get it in the
message header while processing it. As per my findings, we can not update
the message, But I want to update the delay for the message with the same
message-id wile retrying. I want to update delay in every retry, so is it
possible? And also I noticed one thing, if my message processing fails then
it is not processed again automatically. It is there in the queue after it
fails but not processing again or retrying again, basically not polling
from the consumer, it is polling only new messages not the rescheduled
ones, so for this do I need to have any configuration or what? I hope it's
clear now. Thanks again and looking for your valuable response.




Regards,
Saurabh Singh

On Wed, 15 Nov, 2023, 01:32 Justin Bertram, <jbertram@apache.org> wrote:

> > ...I want to configure maxRetryCount and delayed-redelivery for messages
> on failure based on queue configuration means dynamically for one queue
> different and second queue different and so on.
> 
> It's not clear what you mean by "dynamically." Do you mean it might change
> *every* time even on the same queue or just that each queue needs to have
> its own individual setting and that setting will be static? If it's the
> former then you should probably manage that in the STOMP client itself (as
> Matt mentioned already on this thread). However, if it's the latter then
> you could definitely do this with Artemis. For what it's worth, the
> relevant documentation for Artemis is here [1].
> 
> 
> Justin
> 
> [1]
> 
> https://activemq.apache.org/components/artemis/documentation/latest/undelivered-messages.html#message-redelivery-and-undelivered-messages
>  
> On Tue, Nov 14, 2023 at 11:56 AM Saurabh Singh <
> singhsaurabh1622000@gmail.com> wrote:
> 
> > Hello Team,
> > I need support for activeMq implementation via STOMP protocol in my node
> > js. Project.
> > 
> > I have gone through the documentation some of the points are clear but
> need
> > clearance and support on one point.
> > 
> > In my project I have many queues, and I want to configure maxRetryCount
> > and delayed-redelivery for messages on failure based on queue
> configuration
> > means dynamically for one queue different and second queue different and
> so
> > on. So how should I configure not sure.
> > 
> > Example - let's say I have posted a message in a queue, and processing of
> > that message is failed in first attempt, then I want to increase the
> delay
> > for that message and after that delay the message should polled from
> queue
> > automatically and should process again.
> > 
> > How can I achieve this functionality? Can anyone please help on this?
> > 
> > Thanks in advance.
> > 
> > 
> > 
> > Regards,
> > Saurabh Singh
> > Software Engineer
> > 
> 



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic