Also,

I am testing jms queue at the moment but my use case also include proving a
topic. Would the topic redistribute message differently ?

Thai

On Tue, Jun 1, 2021, 22:30 Justin Bertram <[email protected]> wrote:

> Thanks for the clarification.
>
> Did you wait for the connection TTL to elapse before looking for
> redistribution? Given your description, the consumer was terminated before
> it properly closed its connection so the broker would still think the
> consumer was active and therefore wouldn't redistribute any messages until
> the dead connection's TTL elapsed and the broker closed it. You would see
> logging on the broker indicating that it was cleaning up a session.
>
> Also, are you using a JMS queue or topic?
>
>
> Justin
>
> On Tue, Jun 1, 2021 at 9:13 PM Thai Le <[email protected]> wrote:
>
> > Hi Justin,
> >
> > It is not the same question. The question posted on stackiverflow is
> about
> > the case where one of the broker crashes and comes back. This question is
> > about the message consumer/queue listener dies and come back.
> >
> > A few weeks back I was able to make this work on a cluster with 3 master
> > and 3 slaves. Now I don't have the slaves.
> >
> > I hope it's clearer
> >
> > Thai Le
> >
> >
> > On Tue, Jun 1, 2021, 21:52 Justin Bertram <[email protected]> wrote:
> >
> > > Isn't this essentially the same question you asked on Stack Overflow
> [1]?
> > > If so, why are you asking it again here when you have marked the answer
> > as
> > > correct. If not, please elaborate as to how the two use-cases differ.
> > > Thanks!
> > >
> > >
> > > Justin
> > >
> > > [1]
> > >
> > >
> >
> https://stackoverflow.com/questions/67644488/activemq-artemis-cluster-does-not-redistribute-messages-after-one-instance-crash
> > >
> > > On Tue, Jun 1, 2021 at 8:42 PM Thai Le <[email protected]> wrote:
> > >
> > > > Hello guys,
> > > >
> > > > I have a cluster of 2 Artemis brokers (2.17.0) without HA running in
> > > > kubernetes. They are configured with redistribution-delay=0 but when
> > the
> > > > consumer dies and comes back it connects to the other Artemis node
> but
> > > > redistribution of left over messages from the previous Artemis node
> > does
> > > > not happen.
> > > >
> > > > The client connection is defined like this:
> > > >
> > > > spring.artemis.broker-url=
> > >
> >
> (tcp://activemq-artemis-master-0.activemq-artemis-master.n-stack-nle.svc.cluster.local:61616,tcp://activemq-artemis-master-1.activemq-artemis-master.n-stack-nle.svc.cluster.local:61616)
> > > >
> > > > In my test, I sent 10 messages to the queue, then I killed the
> > > > consumer after it consumed the first 3. When kubernetes revived the
> > > > consumer, I saw it reconnected to the other Artemis pod (same queue
> > name
> > > > created) but the queue was empty. The queue on the previous Artemis
> pod
> > > > still has 7 messages undelivered.
> > > >
> > > > Is there a config I am missing?
> > > >
> > > > Regards
> > > >
> > > > Thai Le
> > > >
> > >
> >
>

Reply via email to