Service Bus MessageQueue error

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives


When working with Queues in AppFabric ServiceBus you might get following exception:

It is not possible for an entity that has group support enabled to create a non grouped message receiver.

This exception is caused usually by following line of code:

MessageReceiver myMessageReceiver = myQueueClient.CreateReceiver(ReceiveMode.PeekLock);

This call creates receiver from the queue which should not be session-enabled.

If the queue has been created as session enabled the error shown above will be thrown.

To workaround this error either create the queue with RequiresSession = FALSE

Queue myQueue = namespaceClient.CreateQueue(QueueName, new QueueDescription() { RequiresSession = FALSE});

or create the session-aware receiver

SessionReceiver myMessageReceiver = myQueueClient.AcceptSessionReceiver("mysession2", ReceiveMode.PeekLock)


Posted Oct 25 2011, 10:39 PM by Damir Dobric
developers.de is a .Net Community Blog powered by daenet GmbH.