Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Java mqtt "too many publishes in progress" issue.

Hi Jianing,

Could you confirm which version of the client you're using and which client object you're using (Client or AsyncClient).



On 18 September 2013 05:45, Jianing Ren <jianingr@xxxxxxxxxxxx> wrote:

Hi All,

Thanks for your all development projects in advance.

Our project is currently use java mqtt broker, the issue now was when the server-----producing application (publisher) ,publishes the message to clients. If there is certain amount of clients (around 20), the error "too many publishes in progress" will come out even I manually set the max_in_flight value to 100.

Do not if I wrote correct code on the server side.Below was the code that I publish the message from the server to the clients.

public synchronized void send(Packet packet) {

if(_mqttClient == null || _mqttClient.isConnected() == false) {
_worker.log(TAG"Error: mqtt client offline.");

try {
MqttTopic topic = _mqttClient.getTopic(packet.getTopicName());
String msg = packet.getMessage();
MqttMessage message = new MqttMessage(msg.getBytes());

msg = Packet.logify(msg, packet._type, packet.getToken());
_worker.log(TAG"<mqtt-snd topic='" + topic.getName() + "'>" + msg + "</mqtt-snd>");
/*MqttDeliveryToken resp = */
catch (MqttException exception) {
_worker.log(TAG, exception.getMessage());
_worker.log(TAG"Error: mqtt send packet failed: < " + packet.getMessage() + " >");
catch (Exception e) {

Jianing Ren
Software Developer

a: ADTEC Communications. Suite13, 89-97 Jones street, Ultimo NSW Australia 2007
ADTEC Communications is a 100% Australian owned critical communications, voice, video and data conferencing specialist.
This e-mail may contain confidential information. If you are not the intended recipient do not keep, forward, use, save or reply to this communication

This email has been processed by SmoothZap -

paho-dev mailing list

Back to the top