Problem
When publishing node.send(…), where PayloadItem contains JSON, the LeafNode’s send method throws org.jivesoftware.smack.SmackException$NoResponseException: No response received within packet reply timeout. Timeout was 5000ms (~5s).
I did try setPacketReplyTimeout(5000 * 10) but this just made waiting to get same exception longer.
Details
- Node is a simple instant node, not using ConfigureForm.
- Subscriber (not shown below) is on a different thread of control with different connection and he is waiting with a NodeConfigureListener handler…
- jsonObject is ~ 5 megabyte and validates with JSONParser.parse
- Using smack-4.1.0-beta2-SNAPSHOT-2015-01-14
- Using ejabberd 14.12 community
//…
assertNotNull(con);
assertNotNull(jsonObject);
**// Create a pubsub manager using an existing connection that is valid** ```PubSubManager mgr = new PubSubManager(con);
`
**// Get the node that was previously created** LeafNode node = mgr.getNode("testNode");
//Create JSON payload
JsonPacketExtension jasonPacketExtension = new JsonPacketExtension(jsonObject.toString());
PayloadItem payloadItem = new PayloadItem(jasonPacketExtension); // no client id, just let server create id
// Publish an Item with JSON payload
node.send(payloadItem); *** //<================ NoResponseException: No response received within packet reply timeout.***