IBM Worklight - push notifications from standalone server take longer to arrive compared to development server

StackOverflow https://stackoverflow.com/questions/23287647

سؤال

I'm using Worklight 6.1 on Liberty profile 8.5.5 in Windows XP in a VMWare in a Mac.

I have an Android app that receives notifications. I'm using an adapter to send the notifications.
It is my own app but the adapter is the same as in the push notifications sample project provided by IBM.

For sending the notification I'm directly calling the adapter from a browser using the REST call (protocol://server:port/app/[dev/]invoke?adapter=myAdapter&procedure...)

When I execute the application in the development server the notifications arrives almost immediately, but when I test the application in the test server (mentioned above) the notifications takes a lot of time to arrive, if they arrive.

However, when the notification does arrive, the next notifications arrives in seconds.

It is something I have experienced in the past also with previous Worklight versions.
I do not know what is the difference between the servers or if the problem is related to the server.

Any hints for debugging this?

هل كانت مفيدة؟

المحلول

I have enabled the trace:

<logging traceSpecification="*=audit=enabled:com.worklight.integration.notification.*=finest=enabled" />

I can see the trace:

com.worklight.integration.notification.gcm.GCMSender         1 sendNoRetry Sending JSON to GCM server: {"collapse_key":"myPush","data":{"alert":"Hay una nueva ficha","payload":"{\n   \"alias\": \"myPush\",\n   \"identificador\": \"a035\",\n   \"nombre\": \"aName35\"\n}","badge":"1"},"registration_ids":["APA91bG03cXkyVM6pA2-CO1g-tZUQL6FwJgugaa68YngIyGbbR_oDzVNn-1RULpoktvMUKwF3D1qK4bx-4OVeAbUzBqNpqO3m_1hwz0Z6I0B_DS_Jvc0wzI_fjKpJ9vqPNO58Bdt40ms"]} [project DemoM]

But I do not know if that trace means that everything has gone ok and the message is now in the GCM servers.

I have also enabled sniffers (WireShark in Mac and SmartSniff in XP) in dev server and stand alone server but I have not been able to detect any pattern. Everything is under https so I only see some traces for google hosts but I can not take any conclusions. Although it is valid to see a trace for google gcm immediately after the server trace that takes less than 500ms

Anyway now it is taking time to the notification to arrive in both servers so I guess everything is working fine in the worklight side.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top