-
1. Re: Sending 512 kb of message Failing....
ataylor May 13, 2008 3:42 AM (in response to john_jbm)looks like there is something wrong with your code. Please provide more info, the stacktrace and your example.
-
2. Re: Sending 512 kb of message Failing....
john_jbm May 13, 2008 4:29 AM (in response to john_jbm)My code snippet i like this
StringBuilder message = new StringBuilder();
for (int i = 0; i < 32768; i++) {
message.append("aaaaaaaaaaaaaaaa");
}
// 32768*16 == 512 kb
TextMessage mesg = null;
try {
if (session != null) {
mesg = session.createTextMessage(message);
} else {
throw new DataTransportException("Session object not found");
}
if (producer != null) {
try {
producer.send(mesg, DeliveryMode.PERSISTENT, 9, 0);
} catch (Exception e) {
System.out.println(e.getMessage());
throw new DataTransportException("Not able to send message");
}
}
System.out.println("Sending message :: " + message);
} catch (Exception e) {
System.out.println("Error In Sending Message :: " + message
+ " The error is :: " + e.getMessage());
throw new DataTransportException("Message Not Send");
} -
3. Re: Sending 512 kb of message Failing....
ataylor May 13, 2008 4:50 AM (in response to john_jbm)As far as i can see, that code snippet shouldn't compile, you're passing a StringBuilder as a parameter when creating the text message, i.e.
mesg = session.createTextMessage(message);
however, if i fix this:mesg = session.createTextMessage(message.toString());
then i can run your code snippet, i would make sure you have the latest version of JBM and double check you're code is correct! -
4. Re: Sending 512 kb of message Failing....
john_jbm May 15, 2008 1:41 AM (in response to john_jbm)Sorry for late reply...
I had some problem while sending .. but it seems i am able to send messages
of size 256 kb also. but the surprising thing is while consuming some 10 000 messages the memory shoot up is more, and finally out of memory.
is there any memory leak is happening from JBM side while consuming ??
if try to consume 512 kb from persistance data base , consuming only the
memory shoot up very much . dont know what to do ??
and also if i close consumer five , six time, it simply stuck while getting the connection?
--Thanks -
5. Re: Sending 512 kb of message Failing....
ataylor May 15, 2008 2:47 AM (in response to john_jbm)post your consumer code so i can see what you are doing!
Also make sure you are using the latest versions of JBM and remoting