Limit on message size

Hi,

I’‘m trying to send a large message (about 100K) from Smack 3.0.0b1 over Wildfire 3.2.2 to Smack 3.0.0b1. The message is sent without an exception, but never reaches it’'s destination. Is there a limitation on message size in Smack and/or Wildfire?

Regards,

Sven Schulz

Hey Sven,

Can you paste the XML that you are sending or any error that you see in the server? We have a Smack test case that sends “huge” messages and it works fine. I changed it to send a message whose body contains 100K chars and it was successfully received by the other Smack client. Here is the code of the test case.

public void testHugeMessage() {
        getConnection(0).sendPacket(new Presence(Presence.Type.available));
        getConnection(1).sendPacket(new Presence(Presence.Type.available));
        // User2 becomes available again
        PacketCollector collector = getConnection(1).createPacketCollector(
                new MessageTypeFilter(Message.Type.chat));         // Create message with a body of 4K characters
        Message msg = new Message(getFullJID(1), Message.Type.chat);
        StringBuilder sb = new StringBuilder(150000);
        for (int i = 0; i <= 100000; i++) {
            sb.append("X");
        }
        msg.setBody(sb.toString());         // Send the first message
        getConnection(0).sendPacket(msg);
        // Check that the connection that sent the message is still connected
        assertTrue("Connection was closed", getConnection(0).isConnected());
        // Check that the message was received
        Message rcv = (Message) collector.nextResult(1000);
        assertNotNull("No Message was received", rcv);         // Send the second message
        getConnection(0).sendPacket(msg);
        // Check that the connection that sent the message is still connected
        assertTrue("Connection was closed", getConnection(0).isConnected());
        // Check that the second message was received
        rcv = (Message) collector.nextResult(1000);
        assertNotNull("No Message was received", rcv);
    }

If you want you can also send me your code so I can test it locally.

Regards,

– Gato

Hi,

I have the same problem.

I’'m trying to send a large message (about 200 characters) from Smack 3.0.0b1 over Wildfire 3.2.2 to different IM.

For the message larger than 150 characters the message is sent without an exception, but never reaches it’'s destination for Live Messaenger, MSN messenger and yahoo messenger.

For AOL, ICQ and any content beyond the maximum (average 150 characters) body size is truncated.

My source code is the same that you post above.

Can someone help me ? I’'m trying to solve that for a long time…

Regards,

Philipp

Hi Philipp,

is this a problem with the gateway plugin or do you see this also when you send a message to another xmpp client?

If it’'s a gateway issue please post this problem in the gateway forum.

LG

Hi LG,

Thanks for your help.

For information my Plug-in version is 1.0 from March 15, 2007.

I’'m going to test with other xmpp client.

Philipp

Hi again,

That’'s right, sending message seems to work fine with another xmpp client.

I’'m going to post in Gateway forum

Philipp