activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From FastEddie <>
Subject CMS - setStringProperty() max length
Date Mon, 21 Jul 2008 21:21:41 GMT

I'm using a TextMessage, and also setting a StringProperty on it.

What is the max size of the StringProperty?

I noticed in this thread, that the max size of the TextMessage itself can be
up to 2gb: 

And I am able to send TextMessages with large strings as the TextMessage

But when I set a StringProperty with a large string, it gives an exception.

I'm using CMS, and you can see this behavior with a simple modification to

// Create a messages
string text = (string)"Hello world! from thread " + threadIdStr;

string textProperty;
textProperty.assign( 32800, 'z' );

for( int ix=0; ix<numMessages; ++ix ){
   TextMessage* message = session->createTextMessage( text );

   message->setIntProperty( "Integer", ix );
   message->setStringProperty( "zzzzz", textProperty );

   // Tell the producer to send the message
   printf( "Sent message #%d from thread %s\n", ix+1, threadIdStr.c_str() );
   producer->send( message );

   delete message;

So, my question is, why is there a string size limit on the StringProperty,
but not on the TextMessage itself?  And what are my alternatives?

Thanks in advance
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message