1
votes

I'm trying to setup a WCF service to handle poison queue messages and I'm struggling to do so. I have a WCF service configured as:

<endpoint address="net.msmq://serverip/private/services/eventservice.svc;poison"
    binding="netMsmqBinding" 
    bindingConfiguration="MsmqBindingTransactionalSecurityPoisonHandling"   
    contract="App.IEventService" />

My binding configuration is:

<binding name="MsmqBindingTransactionalSecurityPoisonHandling" exactlyOnce="true" durable="true">
        <security mode="None" />
</binding>

However, I'm getting this error:

Cannot detect if the queue is transactional.

And

An error occurred when converting the 'serverip\private$\services/eventservice.svc;poison' queue path name to the format name: The queue path name specified is invalid. (-1072824300, 0xc00e0014). All operations on the queued channel failed. Ensure that the queue address is valid. MSMQ must be installed with Active Directory integration enabled and access to it is available.

The queue path name is valid, and MSMQ with Active Directory integration is enabled, so I don't understand why the error has occurred???

EDIT: the definition of my service for poison queue handling is the following:

<ServiceBehavior(AddressFilterMode:=AddressFilterMode.Any, InstanceContextMode:=InstanceContextMode.Single, ConcurrencyMode:=ConcurrencyMode.Single)>
Public Class EventService
    Implements IEventService

    <OperationBehavior(TransactionScopeRequired:=True, TransactionAutoComplete:=True)>
    Public Sub ProcessEvent(msg As EventMessage) Implements IEventService.ProcessEvent

    End Sub
End Class
1
According to the error message, you have a mix of forward and back slashes in your queue path. Is this a typo?tom redfern
WCF over MSMQ uses forward slashes only; it gets translated. For instance, I am successfully making requests for my service that connects to the main queue via: net.msmq://serverip/private/services/eventservice.svc. It's just the poison subqueue connectivity I don't know about.Brian Mains

1 Answers

1
votes

OK so if I understand, your original netMsmq poison queue address is somehow being "translated" into the string which then cannot be resolved to a format name (according to the error message).

Can I ask if you're using transactional queues? Honest question, but you've specified transaction semantics in your binding configuration, which also must be coupled with the appropriate OperationBehaviorAttribute in your service operation implementation, and of course, a transactional queue.

Additionally, have you implemented an AddressFilterMode on your service implementation? For poison message handling this should be set to "Any", and I believe has an impact on queue address resolution, and is required for the poison message handler.

[ServiceBehavior(AddressFilterMode = AddressFilterMode.Any)]
public MyPoisonHanderImplementation : IMyPoisonHandler
{...}

Also I'm a little confused as to why you need to enable AD integration when you're only using private queues? Or is this a requirement for another reason?