activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: CMS - setStringProperty() max length
Date Thu, 24 Jul 2008 13:25:15 GMT

There could be a bug here, could you raise a jira issue to document the
problem and your platform.

Regards
Tim

On Mon, 2008-07-21 at 14:21 -0700, FastEddie wrote:
> 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:
> http://www.nabble.com/TextMessage-vs-ByteMessage-vs-StreamMessage-td16755490.html 
> 
> And I am able to send TextMessages with large strings as the TextMessage
> text.
> 
> 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
> src\examples\main.cpp:
> 
> // 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


Mime
View raw message