Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

receive all the times #95

Open
NoPerfectName opened this issue Nov 2, 2017 · 1 comment
Open

receive all the times #95

NoPerfectName opened this issue Nov 2, 2017 · 1 comment

Comments

@NoPerfectName
Copy link

NoPerfectName commented Nov 2, 2017

I use the blocking connection api ,when I receive the message and then "message.ack()",but I can receive the message again on the next time,what is wrong?

connection = mqtt.blockingConnection();
 connection.connect();
connection.subscribe(topics);
while (true) {             
                Message message = connection.receive();
                String receiveMessage = String.valueOf(UTF8Buffer.utf8(message.getPayloadBuffer()));
                System.out.println(receiveMessage);
                message.ack();
}
@Vivien-
Copy link

Vivien- commented Jul 11, 2019

Hi, how did you solve this issue ?
I use the future API but am facing the same issue : I can only fetch 1 notification but there is not really a way to subscribe to any notification from a topic ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants