You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by sparky2708 <da...@columbia.edu> on 2006/08/03 18:48:47 UTC

Extra Spaces in Text Messages received through OpenWire.NET

It seems that when I send messages from the example producer in ActiveMQ in
Java by running "ant producer" and try to receive the message in
OpenWire.NET using c# there are a lot of blank spaces that are added to the
message when I receive it. I am just using the example OpenWire.NET client
you provide and the example java classes that you provide. Any idea why
there are so many spaces added? My C# code looks like:

private IMessageConsumer _consumer;
public string Receive()
            {
                IMessage message = _consumer.Receive();
                if (message == null)
                    return null;
                else
                    return ((ITextMessage) message).Text;
            }
-- 
View this message in context: http://www.nabble.com/Extra-Spaces-in-Text-Messages-received-through-OpenWire.NET-tf2046718.html#a5636231
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Extra Spaces in Text Messages received through OpenWire.NET

Posted by sparky2708 <da...@columbia.edu>.
Good catch! Thanks ;-)
-- 
View this message in context: http://www.nabble.com/Extra-Spaces-in-Text-Messages-received-through-OpenWire.NET-tf2046718.html#a5640999
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Extra Spaces in Text Messages received through OpenWire.NET

Posted by Hiram Chirino <hi...@hiramchirino.com>.
Yep, then you should be on the latest.

Oh I just noticed that the your using the ant producer examples.  The
white spaces are there because the producer white space pads the
message so they are of a specified size.  If you pass a
-DmessageSize=100 option on the command line, then the message will be
100 characters big.

Is there a way to get automated builds of this going?  That way we
could publish nightly snapshots of the DLL.

On 8/3/06, sparky2708 <da...@columbia.edu> wrote:
>
> I am not sure if OpenWire.NET has versioning but I just took what was in SVN
> a few days ago and compiled that. Is there some branch or tag I am supposed
> to check out? (I just followed the instructions on the ActiveMQ website and
> retrieved the latest code). BTW, it would be easy for us, Users, to just
> download the DLL file (preferably strongly signed) instead of compiling
> ourselves if that is possible.
> --
> View this message in context: http://www.nabble.com/Extra-Spaces-in-Text-Messages-received-through-OpenWire.NET-tf2046718.html#a5637153
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: Extra Spaces in Text Messages received through OpenWire.NET

Posted by sparky2708 <da...@columbia.edu>.
I am not sure if OpenWire.NET has versioning but I just took what was in SVN
a few days ago and compiled that. Is there some branch or tag I am supposed
to check out? (I just followed the instructions on the ActiveMQ website and
retrieved the latest code). BTW, it would be easy for us, Users, to just
download the DLL file (preferably strongly signed) instead of compiling
ourselves if that is possible.
-- 
View this message in context: http://www.nabble.com/Extra-Spaces-in-Text-Messages-received-through-OpenWire.NET-tf2046718.html#a5637153
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Extra Spaces in Text Messages received through OpenWire.NET

Posted by Hiram Chirino <hi...@hiramchirino.com>.
What versions are you using?  There was a recent TextMessage fix in
the .NET stuff.

On 8/3/06, sparky2708 <da...@columbia.edu> wrote:
>
> It seems that when I send messages from the example producer in ActiveMQ in
> Java by running "ant producer" and try to receive the message in
> OpenWire.NET using c# there are a lot of blank spaces that are added to the
> message when I receive it. I am just using the example OpenWire.NET client
> you provide and the example java classes that you provide. Any idea why
> there are so many spaces added? My C# code looks like:
>
> private IMessageConsumer _consumer;
> public string Receive()
>             {
>                 IMessage message = _consumer.Receive();
>                 if (message == null)
>                     return null;
>                 else
>                     return ((ITextMessage) message).Text;
>             }
> --
> View this message in context: http://www.nabble.com/Extra-Spaces-in-Text-Messages-received-through-OpenWire.NET-tf2046718.html#a5636231
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com