activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Birdsall <>
Subject NMS and 4.1.0 problems
Date Sat, 09 Dec 2006 21:44:17 GMT

Hi there,

I checked out the ActiveMQ-dotnet trunk from:

Revision 484893 jlim
Last commit revision 477581

And have been having problems with the NMS client and ActiveMQ release

I can get a connection, but when I try and do anything with it, the code
throws a Null reference exception. I based my code on the example given on
the NMS webpage on the ActiveMQ website:

IConnectionFactory factory = new ConnectionFactory(new
using (IConnection connection = factory.CreateConnection())
  connection.ExceptionListener += new
  ISession session = connection.CreateSession();

I've configured everything up as follows:

       <transportConnector name="openwire" uri="tcp://serendipity:61616"/>
       <transportConnector name="stomp"    uri="stomp://serendipity:61613"/>

The example java consumer and producers work fine, so I am guessing there's
some problem with the C# code, unless I am doing something wrong?

I've tried changing the url from "serendipity" to "localhost" in both client
and configuration, but the problem still remains.

There seems to be a problem in TcpTransport.ReadLoop caused by a NULL_TYPE
being read inside OpenWireFormat.Unmarshal, because the first two commands
(dataTypes = 1, 2) are unmarshalled:

{WireFormatInfo[ Magic=System.Byte[] Version=2
MarshalledProperties={StackTraceEnabled=True, MaxInactivityDuration=30000,
CacheSize=1024, TcpNoDelayEnabled=True, TightEncodingEnabled=True,
SizePrefixDisabled=False, CacheEnabled=True} ]}
{BrokerInfo[ BrokerId=BrokerId[ Value=ID:serendipity-1439-1165697313562-1:0
] BrokerURL=tcp://serendipity:61616
PeerBrokerInfos=ActiveMQ.Commands.BrokerInfo[] BrokerName=localhost
SlaveBroker=False MasterBroker=False FaultTolerantConfiguration=False
DuplexConnection=False NetworkConnection=False ]}

But on the 3rd iteration, it reads a NULL_TYPE and then throws with a null

I did notice the "NetworkConnection=False" in the second command - am I
doing something wrong with my configuration? And if so, how come the example
java consumer and producers work okay with my installation.

The java examples both work when ActiveMQ is run as a Windows service and
from the batch file.

Another slight problem I had - the Service Wrapper "wrapper.jar" wasn't
included in the 4.1.0 binary distribution I downloaded, so I had to download
it separately from TanukiSoftware's website.

Many thanks for your time and help, I'm looking forward to using ActiveMQ
once I can get NMS working :-)

David Birdsall
Software Engineer
mxData Ltd
View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message