You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Raul Valdoleiros <ra...@gmail.com> on 2018/01/30 08:52:15 UTC

[Artemis] Some data isn't delivered using Paho client

Hi,

I'm using paho client to connect to Artemis using the MQTT protocol.
My test case is:

   - Send 50k messages to the broker
   - Connect 1 subscriber and start consuming the messages

Some messages aren't delivered and I need to restart the consumer for them
to be consumed.

I saw a topic regarding Apollo (
http://activemq.2283324.n4.nabble.com/Cannot-receive-every-message-by-mqtt-protocol-td4712595.html#a4712604)
but it didn't found a solution there.

Can you help me understand what is wrong here?

Thanks in advance,
Raul

Re: [Artemis] Some data isn't delivered using Paho client

Posted by Justin Bertram <jb...@apache.org>.
Can you work-up a test-case to reproduce the issue?  You could easily base
this on one of the MQTT examples we ship with the broker.


Justin

On Thu, Feb 1, 2018 at 5:17 AM, Dustbit <ti...@ceiia.com> wrote:

> Hello,
>
> I work with Raul and we found what was causing the problem.
>
> Problem and steps to reproduce:
>
> - Connect subscriber to broker (cleanSession=false)
> - Subscribe 3 topics (through 3 different calls using the same client)
> - Disconnect subscriber
> - Send 50k messages to the broker (broker holds messages as it's queues are
> durable)
> - Connect subscriber (with same clientId)
> - Subscribe the same 3 topics (through 3 different calls using the same
> client)
> - No pending messages are sent to the subscriber, even though they're in
> the
> queue
>
> When disconnecting the subscriber again some message were flushed, but
> reconnecting again resulted in the same stale situation.
> New messages arriving the broker were being sent just fine to all topics,
> only the ones already there were not sent.
>
> Cause:
> If instead of subscribing through 3 different calls for 3 different topics,
> we subscribe in 1 call with the 3 topics (as an array) everything works
> fine
> on reconnect.
>
> I think there's something wrong on the re-attach/reconnect logic that is
> causing this behavior, that's why when I was disconnecting (and
> unsubscribing) the 3 topics, when it reached 1 topic only the broker
> started
> sending the messages.
>
>
>
>
> --
> Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-
> f2341805.html
>

Re: [Artemis] Some data isn't delivered using Paho client

Posted by Dustbit <ti...@ceiia.com>.
Hello, 

I work with Raul and we found what was causing the problem.

Problem and steps to reproduce:

- Connect subscriber to broker (cleanSession=false)
- Subscribe 3 topics (through 3 different calls using the same client)
- Disconnect subscriber
- Send 50k messages to the broker (broker holds messages as it's queues are
durable)
- Connect subscriber (with same clientId)
- Subscribe the same 3 topics (through 3 different calls using the same
client)
- No pending messages are sent to the subscriber, even though they're in the
queue

When disconnecting the subscriber again some message were flushed, but
reconnecting again resulted in the same stale situation.
New messages arriving the broker were being sent just fine to all topics,
only the ones already there were not sent.

Cause:
If instead of subscribing through 3 different calls for 3 different topics,
we subscribe in 1 call with the 3 topics (as an array) everything works fine
on reconnect.

I think there's something wrong on the re-attach/reconnect logic that is
causing this behavior, that's why when I was disconnecting (and
unsubscribing) the 3 topics, when it reached 1 topic only the broker started
sending the messages.




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