You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by Tomas Restrepo <to...@devdeo.com> on 2007/02/02 22:44:10 UTC

Connection.Start() question

Here's something I've noticed on the .NET client code that seems a bit odd
to me:

In the current code, you create a new connection (AMQConnection), use it to
create a channel, then a publisher and send some messages and it will work
just fine if you don't explicitly call Connection.Start() before doing so.

However, if you try to do a similar thing when consuming messages (i.e.
create a connection, create a channel, create a consumer, listen to
messages), it doesn't work.

Several things bother me about this:

1- On the second case, there's no error. The consumer simply never sees any
messages arriving at the queue. That said, I've verified that indeed the
consumer gets bound to the queue at the broker and I can see the messages
getting sent from the broker to the client. 

Instead, the messages never get delivered to the consumer.

2- What exactly is the right moment to call Connection.Start()? Before or
After creating channels?

3- If Connection.Start() is a required call, why are we not enforcing it? It
sure sounds better to just throw an exception and force the developer to
call it than simply letting it happen and then ignore any messages received.
It's confusing and it's hard to debug.

So here's a question: Is this just an issue in the .NET client, or does the
Java client behave the same way?


Tomas Restrepo
tomas.restrepo@devdeo.com
http://www.winterdom.com/weblog/