You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ipolevoy <ig...@expresspigeon.com> on 2017/11/20 17:39:30 UTC

Messages delayed for no reason

Some of the messages sit in a queue, while we have available and registered
listeners. After a few hours, the messages are delivered. What can be the
cause of that? 

We use Artemis embedded using the JavaLite Async wrapper: 

https://github.com/javalite/activeweb/blob/master/javalite-async/src/main/java/org/javalite/async/Async.java

Any help is appreciated!




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Messages delayed for no reason

Posted by Clebert Suconic <cl...@gmail.com>.
what do you have for redelivery delay?

Perhaps your client throwed an exception (ActiveException on your codebase)?


I would log those.

On Mon, Nov 20, 2017 at 3:42 PM, ipolevoy <ig...@expresspigeon.com> wrote:
> The entire code base except Artemis is under our control. The vast majority
> of the messages are delivering fast ,more than 99.999. The use case:
>
> An API submits a POST request, we form a message and stick it into a queue.
> The queue has 10 listeners. When these listeners receive a Message, they
> write info to DB and then send email.
> In most cases, this process takes a few seconds (mostly due to delay in
> SMTP).
> However, some messages are stuck in a queue for more than 12 hours, for no
> apparent reason.
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html



-- 
Clebert Suconic

Re: Messages delayed for no reason

Posted by ipolevoy <ig...@expresspigeon.com>.
The entire code base except Artemis is under our control. The vast majority
of the messages are delivering fast ,more than 99.999. The use case: 

An API submits a POST request, we form a message and stick it into a queue.
The queue has 10 listeners. When these listeners receive a Message, they
write info to DB and then send email. 
In most cases, this process takes a few seconds (mostly due to delay in
SMTP). 
However, some messages are stuck in a queue for more than 12 hours, for no
apparent reason. 




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Messages delayed for no reason

Posted by Clebert Suconic <cl...@gmail.com>.
Are you running your customer's code on these listeners? do you have
any slow consumers? if that's the case a slow consumer will have a
buffer on the client that won't be available for a while until you
release your listener. You could setup consumer-window-size=0 for any
slow consumers.


(You have a library.. do you have control of the client running?)


If you do I would need a testcase to figure out what's happening.. but
most likely I it's about the client buffer of your consumers.


if you don't have control of the environment where this is happening
first thing I would ask is a thread dump so you could see what your
user is hanging on.

On Mon, Nov 20, 2017 at 2:38 PM, ipolevoy <ig...@expresspigeon.com> wrote:
> yep, we do use MessageListener, and register 10 instances of them on the same
> queue.
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html



-- 
Clebert Suconic

Re: Messages delayed for no reason

Posted by ipolevoy <ig...@expresspigeon.com>.
yep, we do use MessageListener, and register 10 instances of them on the same
queue. 




--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Re: Messages delayed for no reason

Posted by Clebert Suconic <cl...@gmail.com>.
Why you don’t use message listeners?

I couldn’t run your code but I had the inpresssion you could have messages
waiting at the client buffer.



I regard to your old Libaio thread. Is this where you put on the embedded
to work ? Maybe I could replicate the issue there !

On Mon, Nov 20, 2017 at 12:39 PM ipolevoy <ig...@expresspigeon.com> wrote:

> Some of the messages sit in a queue, while we have available and registered
> listeners. After a few hours, the messages are delivered. What can be the
> cause of that?
>
> We use Artemis embedded using the JavaLite Async wrapper:
>
>
> https://github.com/javalite/activeweb/blob/master/javalite-async/src/main/java/org/javalite/async/Async.java
>
> Any help is appreciated!
>
>
>
>
> --
> Sent from:
> http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html
>
-- 
Clebert Suconic