You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Timothy Bish <ta...@gmail.com> on 2008/08/10 01:48:10 UTC

Re: CMS - setStringProperty() max length

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


RE: Installation with VS2005

Posted by "Powers, Matthew" <mp...@Systems.Textron.com>.
Ignore this message - looks like I had created a CRL project.

-----Original Message-----
From: Powers, Matthew [mailto:mpowers@systems.textron.com] 
Sent: Tuesday, August 26, 2008 11:54 AM
To: users@activemq.apache.org
Subject: RE: Installation with VS2005

I tried looking at this and got the most recent build to compile...but I
had problems finding app_pools.h which is included in the APR release.
So I installed that, built it, and added the include directory to my VS
project. 
Now I get a lot of unresolved symbols similar to this...
Error	180	error LNK2019: unresolved external symbol "public:
virtual class "cms::Connection * __clrcall
activemq::core::ActiveMQConnectionFactory::createConnection(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(?createConnection@ActiveMQConnectionFactory@core@activemq@@$$FUAMPAVCon
nection@cms@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@
std@@00@Z) referenced in function "void __clrcall `dynamic initializer
for 'const activemq::core::ActiveMQConnectionFactory::`vftable'''(void)"
(???__E??_7ActiveMQConnectionFactory@core@activemq@@6B@@@YMXXZ@?A0xc2fe3
35d@@$$FYMXXZ)	Forms_App_ActiveMQ.obj	"

Any ideas on this problem?



-----Original Message-----
From: Timothy Bish [mailto:tabish121@gmail.com] 
Sent: Tuesday, August 26, 2008 7:48 AM
To: users@activemq.apache.org
Subject: Re: Installation with VS2005

Look at the project settings we use in our own VC project files to build
and link the example program.  

Regards
Tim.

On Mon, 2008-08-25 at 15:43 -0400, Powers, Matthew wrote:
> I am a newbie to CMS and Visual Studio and was seeing if there was a
> guide to getting this up and running.  I downloaded the libraries, but
> if I want to create a new app and just reference these libraries how
> would I do that?
> Thanks of the information


RE: Installation with VS2005

Posted by "Powers, Matthew" <mp...@Systems.Textron.com>.
I tried looking at this and got the most recent build to compile...but I
had problems finding app_pools.h which is included in the APR release.
So I installed that, built it, and added the include directory to my VS
project. 
Now I get a lot of unresolved symbols similar to this...
Error	180	error LNK2019: unresolved external symbol "public:
virtual class "cms::Connection * __clrcall
activemq::core::ActiveMQConnectionFactory::createConnection(class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &,class std::basic_string<char,struct
std::char_traits<char>,class std::allocator<char> > const &,class
std::basic_string<char,struct std::char_traits<char>,class
std::allocator<char> > const &)"
(?createConnection@ActiveMQConnectionFactory@core@activemq@@$$FUAMPAVCon
nection@cms@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@
std@@00@Z) referenced in function "void __clrcall `dynamic initializer
for 'const activemq::core::ActiveMQConnectionFactory::`vftable'''(void)"
(???__E??_7ActiveMQConnectionFactory@core@activemq@@6B@@@YMXXZ@?A0xc2fe3
35d@@$$FYMXXZ)	Forms_App_ActiveMQ.obj	"

Any ideas on this problem?



-----Original Message-----
From: Timothy Bish [mailto:tabish121@gmail.com] 
Sent: Tuesday, August 26, 2008 7:48 AM
To: users@activemq.apache.org
Subject: Re: Installation with VS2005

Look at the project settings we use in our own VC project files to build
and link the example program.  

Regards
Tim.

On Mon, 2008-08-25 at 15:43 -0400, Powers, Matthew wrote:
> I am a newbie to CMS and Visual Studio and was seeing if there was a
> guide to getting this up and running.  I downloaded the libraries, but
> if I want to create a new app and just reference these libraries how
> would I do that?
> Thanks of the information


Re: Installation with VS2005

Posted by Timothy Bish <ta...@gmail.com>.
Look at the project settings we use in our own VC project files to build
and link the example program.  

Regards
Tim.

On Mon, 2008-08-25 at 15:43 -0400, Powers, Matthew wrote:
> I am a newbie to CMS and Visual Studio and was seeing if there was a
> guide to getting this up and running.  I downloaded the libraries, but
> if I want to create a new app and just reference these libraries how
> would I do that?
> Thanks of the information


Installation with VS2005

Posted by "Powers, Matthew" <mp...@Systems.Textron.com>.
I am a newbie to CMS and Visual Studio and was seeing if there was a
guide to getting this up and running.  I downloaded the libraries, but
if I want to create a new app and just reference these libraries how
would I do that?
Thanks of the information

Re: CMS - setStringProperty() max length

Posted by Timothy Bish <ta...@gmail.com>.
On Mon, 2008-08-25 at 12:01 -0700, FastEddie wrote:
> >From the Jira issue #190 
> https://issues.apache.org/activemq/browse/AMQCPP-190
> >> Max Property size for Strings is actually 65536 incorrect sign was
> >> causing the code to fails on soon on values above 32767.
> 
> I really appreciate you looking into this problem, and fixing it, getting
> the max up to 65k.
> 
> I'm curious why the behavior for StringProperties is different than for the
> text of the TextMessage itself (65k vs 2gb)?  Is it just set somewhere as
> the max length?  Or are they handled differently?
> 
> Is this an architecture limit that I need to account for in my
> implementation?

The difference essentially lies in the way the string length is encoded
for the string properties verses the content of a message itself.  The
content of the message allows for four bytes to define the length but
the string properties only allow for two, so its basically short vs int.

Regards
Tim.


Re: CMS - setStringProperty() max length

Posted by FastEddie <fa...@ict.usc.edu>.
>From the Jira issue #190 
https://issues.apache.org/activemq/browse/AMQCPP-190
>> Max Property size for Strings is actually 65536 incorrect sign was
>> causing the code to fails on soon on values above 32767.

I really appreciate you looking into this problem, and fixing it, getting
the max up to 65k.

I'm curious why the behavior for StringProperties is different than for the
text of the TextMessage itself (65k vs 2gb)?  Is it just set somewhere as
the max length?  Or are they handled differently?

Is this an architecture limit that I need to account for in my
implementation?
-- 
View this message in context: http://www.nabble.com/CMS---setStringProperty%28%29-max-length-tp18577838p19149617.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.