You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Kevin Burton <bu...@spinn3r.com> on 2014/07/25 06:20:59 UTC

redelivery plugin not working… doing something wrong?

I'm trying to get my broker to redeliver messages that aren't successfully
acknowledged.

I'm using client ack, and giving the clients 2 minutes to ack the message.

I have a test setup where I'm trying to simulate that behavior in an
embedded broker.. .but it's not working.

Here's my XML config:

http://pastebin.com/1GKRe6g6

I'm using the redelivery plugin.

I put it in a debugger and I can see that the plugin is loaded with the
correct config.  I also have the scheduler enabled too.

Here's my test:

http://pastebin.com/32AvCCxa

http://pastebin.com/BGMaRwLC

.. it's basically just creating an embedded broker from the given XML.

-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Re: redelivery plugin not working… doing something wrong?

Posted by Kevin Burton <bu...@spinn3r.com>.
I'll take a look now… I realized that my message actually DOES get
redelivered, if I add the close() … BUT … it's instantly redelivered, with
no timeout.


On Fri, Jul 25, 2014 at 3:31 AM, Gary Tully <ga...@gmail.com> wrote:

> you are keeping the connection and consumer open, so the message
> remain inflight from the brokers perspective.
>
> you need to peek at the activemq unit tests to get a handle on redelivery.
>
>
> https://github.com/apache/activemq/blob/fad1dd0f1727af8ce6e0d05a51c32cc63f658e24/activemq-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
>
> and broker redelivery:
>
> https://github.com/apache/activemq/blob/a3a41dae3711f01e13110ed266e9e825b710e986/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
>
> On 25 July 2014 05:20, Kevin Burton <bu...@spinn3r.com> wrote:
> > I'm trying to get my broker to redeliver messages that aren't
> successfully
> > acknowledged.
> >
> > I'm using client ack, and giving the clients 2 minutes to ack the
> message.
> >
> > I have a test setup where I'm trying to simulate that behavior in an
> > embedded broker.. .but it's not working.
> >
> > Here's my XML config:
> >
> > http://pastebin.com/1GKRe6g6
> >
> > I'm using the redelivery plugin.
> >
> > I put it in a debugger and I can see that the plugin is loaded with the
> > correct config.  I also have the scheduler enabled too.
> >
> > Here's my test:
> >
> > http://pastebin.com/32AvCCxa
> >
> > http://pastebin.com/BGMaRwLC
> >
> > .. it's basically just creating an embedded broker from the given XML.
> >
> > --
> >
> > Founder/CEO Spinn3r.com
> > Location: *San Francisco, CA*
> > blog: http://burtonator.wordpress.com
> > … or check out my Google+ profile
> > <https://plus.google.com/102718274791889610666/posts>
> > <http://spinn3r.com>
>
>
>
> --
> http://redhat.com
> http://blog.garytully.com
>



-- 

Founder/CEO Spinn3r.com
Location: *San Francisco, CA*
blog: http://burtonator.wordpress.com
… or check out my Google+ profile
<https://plus.google.com/102718274791889610666/posts>
<http://spinn3r.com>

Re: redelivery plugin not working… doing something wrong?

Posted by Gary Tully <ga...@gmail.com>.
you are keeping the connection and consumer open, so the message
remain inflight from the brokers perspective.

you need to peek at the activemq unit tests to get a handle on redelivery.

https://github.com/apache/activemq/blob/fad1dd0f1727af8ce6e0d05a51c32cc63f658e24/activemq-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java

and broker redelivery:
https://github.com/apache/activemq/blob/a3a41dae3711f01e13110ed266e9e825b710e986/activemq-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java

On 25 July 2014 05:20, Kevin Burton <bu...@spinn3r.com> wrote:
> I'm trying to get my broker to redeliver messages that aren't successfully
> acknowledged.
>
> I'm using client ack, and giving the clients 2 minutes to ack the message.
>
> I have a test setup where I'm trying to simulate that behavior in an
> embedded broker.. .but it's not working.
>
> Here's my XML config:
>
> http://pastebin.com/1GKRe6g6
>
> I'm using the redelivery plugin.
>
> I put it in a debugger and I can see that the plugin is loaded with the
> correct config.  I also have the scheduler enabled too.
>
> Here's my test:
>
> http://pastebin.com/32AvCCxa
>
> http://pastebin.com/BGMaRwLC
>
> .. it's basically just creating an embedded broker from the given XML.
>
> --
>
> Founder/CEO Spinn3r.com
> Location: *San Francisco, CA*
> blog: http://burtonator.wordpress.com
> … or check out my Google+ profile
> <https://plus.google.com/102718274791889610666/posts>
> <http://spinn3r.com>



-- 
http://redhat.com
http://blog.garytully.com