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 Sat, 09 Aug 2008 23:48:10 GMT
I've run this a couple times, definitely something odd there, looks like
the message gets marshaled and sent but the broker never acknowledges
having received it, its possible we are messing up the marshaled data,
we will need to investigate this one further.

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