You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by cmarcel <ch...@gmail.com> on 2009/05/21 23:33:54 UTC
C# / .net - getting started
Hello,
I've spent days trying to figure out how to do the most basic operation with
ActiveMQ from C# (ex.: consume / produce messages on a queue on localhost,
network protocol = anything that works) and can't find ANY documentation:
- the getting started docs are pointing to source files that don't exist:
http://activemq.apache.org/nms/nms.html
- the other samples mentioned in http://activemq.apache.org/nms/ are all
built on top of Spring.Net. In addition, the simplest of the Spring.Net
examples did not work for me (it probably worked in 2007 when it was first
written)
- googling for code samples was no help (nor was searching in this forum,
although the search in the forum is so slow and limited that I did not
search as much as I might have otherwise)
- running 'nant doc' failed to create any documentation for me (I get an
'object reference not set' exception)
- I looked at all the unit tests and they seem to make mainly atomic tests -
I definitively could not find anything off of which to base my own code
- the api documentation (http://activemq.apache.org/nms/ndoc/NMS.html)
doesn't seem to cover apache.nms.activemq - it only documents apache.nms,
which is really pretty useless
-------------------------------------
Anyhow, for those who, like me, are trying to get started, here are a few
things you might want to be aware of:
- build using nant 'beta 2': one of the readme's mentions that nms requires
the Beta 2 version of 0.86 nant (currently it's at beta 1 on the nant site,
so you have to get it from the nightly builds). If you install the stable
version of nant, the build from within visual studio will fail as well, due
to nant pre- and post-build event commands that fail from within VS2008 as
well.
- the connection strings / configuration for nms is, as far as I can tell,
undocumented, so it's hard to say what exactly is required to get things to
run. From single stepping through code, I found that it expects to find
config files with specific names such as 'nmsprovider-tcp.config' or
'nmsprovider-activemq.config'. You will find some sample config files in
the source code.
-------------------------------------
Overall though, with so little documentation and no sample code anywhere, I
really don't see how anyone could get this stuff to work... I'm thinking of
maybe using Spring.Net on top of NMS, but on the one hand I don't want /
need Spring.Net and more importantly, I just want to do something really
simple, something that shouldn't require setting up a large dependency
injection framework to accomplish.
If anyone could find the missing 'TestMain.cs' file that is supposed to be
on the getting started page, or if someone could provide a link or any
sample code, that would be great :)
Thanks,
Christophe
--
View this message in context: http://www.nabble.com/C----.net---getting-started-tp23660800p23660800.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C# / .net - getting started
Posted by mvhoof <mv...@tp2net.com>.
Hi,
I encountered simular issues when getting started with ActiveMQ.NMS..
However, if you search a bit, there is some good info about it on the web. I
would recommend RE.mark's blog which has some very good and very hands on
articles on how to work with NMS.
http://remark.wordpress.com/articles/publish-subscribe-with-activemq-and-nms/
I do agree however that some stuff is poorly documented (or the
documentation is just very had to find) which slows development and probably
will make a lot of people just give up all together :(
Too bad cause ActiveMQ is a very goood product and the NMS API get's the job
done, even if it is not always very clear on how to do it
cmarcel wrote:
>
> Hi Jim,
>
> Thanks for the quick reply. The changes you made really helped me out a
> lot.
>
> For others getting started like me, here are a few other things that
> helped me out:
> - ActiveMQ is a JMS implementation, so a good starting point is any
> documentation on JMS. This should help understand how all the NMS / JMS
> entities work together (connection, session, destination, etc.), in
> addition to covering all the message types (MapMessage vs. TextMessage vs.
> ...) & other things. Once you get a grip on all that stuff (from a java
> standpoint, or whatever), you are in good shape to start coding NMS in C#.
> - In order for the code on the getting started page to work:
> - You need to have the 'nmsprovider-activemq.config' file present
> wherever your exe is (add it to your project and change its solution
> properties so it gets copied to the output directory). You can find
> copies of this file in the activemq NMS source code
> - Assuming you are running activemq on the local machine, change the
> connecturi from 'activemq:tcp://activemqhost:61616' to
> '...//localhost:61616'.
>
> Best,
>
> Christophe
>
>
> semog wrote:
>>
>> Thanks for the heads up on the web-page problems. I updated the NMS
>> Getting Started page and restored the sample code and made sure it was up
>> to date. It may take a day or so for the update to be propagated,
>> though. Try refreshing the page later today, or possibly by tomorrow. I
>> don't know what the regeneration schedule is for the website.
>>
>> Best,
>> Jim
>>
>
>
--
View this message in context: http://www.nabble.com/C----.net---getting-started-tp23660800p23737699.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C# / .net - getting started
Posted by cmarcel <ch...@gmail.com>.
Hi Jim,
Thanks for the quick reply. The changes you made really helped me out a
lot.
For others getting started like me, here are a few other things that helped
me out:
- ActiveMQ is a JMS implementation, so a good starting point is any
documentation on JMS. This should help understand how all the NMS / JMS
entities work together (connection, session, destination, etc.), in addition
to covering all the message types (MapMessage vs. TextMessage vs. ...) &
other things. Once you get a grip on all that stuff (from a java
standpoint, or whatever), you are in good shape to start coding NMS in C#.
- In order for the code on the getting started page to work:
- You need to have the 'nmsprovider-activemq.config' file present
wherever your exe is (add it to your project and change its solution
properties so it gets copied to the output directory). You can find copies
of this file in the activemq NMS source code
- Assuming you are running activemq on the local machine, change the
connecturi from 'activemq:tcp://activemqhost:61616' to
'...//localhost:61616'.
Best,
Christophe
semog wrote:
>
> Thanks for the heads up on the web-page problems. I updated the NMS
> Getting Started page and restored the sample code and made sure it was up
> to date. It may take a day or so for the update to be propagated, though.
> Try refreshing the page later today, or possibly by tomorrow. I don't
> know what the regeneration schedule is for the website.
>
> Best,
> Jim
>
--
View this message in context: http://www.nabble.com/C----.net---getting-started-tp23660800p23726080.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: C# / .net - getting started
Posted by semog <e....@gmail.com>.
Thanks for the heads up on the web-page problems. I updated the NMS Getting
Started page and restored the sample code and made sure it was up to date.
It may take a day or so for the update to be propagated, though. Try
refreshing the page later today, or possibly by tomorrow. I don't know what
the regeneration schedule is for the website.
Best,
Jim
cmarcel wrote:
>
> Hello,
>
> I've spent days trying to figure out how to do the most basic operation
> with ActiveMQ from C# (ex.: consume / produce messages on a queue on
> localhost, network protocol = anything that works) and can't find ANY
> documentation:
>
> - the getting started docs are pointing to source files that don't exist:
> http://activemq.apache.org/nms/nms.html
> - the other samples mentioned in http://activemq.apache.org/nms/ are all
> built on top of Spring.Net. In addition, the simplest of the Spring.Net
> examples did not work for me (it probably worked in 2007 when it was first
> written)
> - googling for code samples was no help (nor was searching in this forum,
> although the search in the forum is so slow and limited that I did not
> search as much as I might have otherwise)
> - running 'nant doc' failed to create any documentation for me (I get an
> 'object reference not set' exception)
> - I looked at all the unit tests and they seem to make mainly atomic tests
> - I definitively could not find anything off of which to base my own code
> - the api documentation (http://activemq.apache.org/nms/ndoc/NMS.html)
> doesn't seem to cover apache.nms.activemq - it only documents apache.nms,
> which is really pretty useless
>
> -------------------------------------
>
> Anyhow, for those who, like me, are trying to get started, here are a few
> things you might want to be aware of:
> - build using nant 'beta 2': one of the readme's mentions that nms
> requires the Beta 2 version of 0.86 nant (currently it's at beta 1 on the
> nant site, so you have to get it from the nightly builds). If you install
> the stable version of nant, the build from within visual studio will fail
> as well, due to nant pre- and post-build event commands that fail from
> within VS2008 as well.
> - the connection strings / configuration for nms is, as far as I can tell,
> undocumented, so it's hard to say what exactly is required to get things
> to run. From single stepping through code, I found that it expects to
> find config files with specific names such as 'nmsprovider-tcp.config' or
> 'nmsprovider-activemq.config'. You will find some sample config files in
> the source code.
>
> -------------------------------------
>
> Overall though, with so little documentation and no sample code anywhere,
> I really don't see how anyone could get this stuff to work... I'm
> thinking of maybe using Spring.Net on top of NMS, but on the one hand I
> don't want / need Spring.Net and more importantly, I just want to do
> something really simple, something that shouldn't require setting up a
> large dependency injection framework to accomplish.
>
> If anyone could find the missing 'TestMain.cs' file that is supposed to be
> on the getting started page, or if someone could provide a link or any
> sample code, that would be great :)
>
> Thanks,
>
> Christophe
>
>
--
View this message in context: http://www.nabble.com/C----.net---getting-started-tp23660800p23661660.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.