[rabbitmq-discuss] WCF .net problems
Emile Joubert
emile at rabbitmq.com
Mon Jan 21 10:45:57 GMT 2013
Hi,
On 21/01/13 08:36, kecke wrote:
> 1. We want the queues messages to be persistant(e.g - if rabbitmq service is
> stopped and restarted the messages will still be in the queue). Is there any
> way to do this(e.g set deliverymode=2) in the app.config?
The WCF binding currently publishes messages with default parameters, so
it is not possible to select deliverymode=2.
> 2. We want durable queues. We found in this messagelist a post about that,
> and the trick was to change this on line 152 in
> rabbitmq.servicemodel.rabbitmqinputchannel Before: string queue =
> m_model.QueueDeclare(); After: string queue =
> m_model.QueueDeclare(base.LocalAddress.Uri.AbsolutePath, true, false, false,
> null); ...we then got durable queues. This couldnt be done in any other way?
A bug has been filed to enhance the WCF binding to offer this feature.
Unfortunately, as with deliverymode=2 the only way to obtain this
feature at the moment is to modify the source and recompile.
> 3.
>
> We want the client(which in our case is a WCF-service) to post a message to
> the queue and then forget(and be sure that sometime in the future the
> message will be delivered), so we have oneway="true" in our app.configs. The
> consumer is also a WCF-service. If we stop the rabbitmq server, then our
> services get an error - like its always connected to RabbitMQ. Is there a
> way in the app.config to tell the services we have to only connect when
> messages is delivered or retrieved?
That's not possible, because the service cannot predict when a message
will arrive and the queues used internally are transient. The service
must always be running.
> 4. It seems that the messages isn't consumed one by one-it seems that it
> gets them all att once? Is there a way to tell service to fetch them one by
> one?
Unfortunately no control over the QoS parameter is provided. The WCF
binding consumes with the default QoS parameter. The only way currently
to obtain this functionality is to modify RabbitMQInputChannel and
recompile.
> 5. We try to do WCF and have all config in app.config, so we dont code
> rabbitmq specific code.
For the degree of control that you require I would suggest that you use
the RabbitMQ .net client directly instead of WCF. This will give you all
the control that you need until the WCF binding is enhanced.
-Emile
More information about the rabbitmq-discuss
mailing list