Azure, SubscriptionClient.OnMessage, and Sessions
<p>Does the Azure Service Bus Subscription client support the ability to use OnMessage Action when the subscription requires a session? </p>

<p>I have a subscription, called "TestSubscription". It requires a sessionId and contains multipart data that is tied together by a SessionId.</p>

<pre><code>if (!namespaceManager.SubscriptionExists("TestTopic", "Export"))
{
    var testRule = new RuleDescription
    {
        Filter = new SqlFilter(@"(Action='Export')"),
        Name = "Export"
    };

var subDesc = new SubscriptionDescription("DataCollectionTopic", "Export")
{
    RequiresSession = true
};
namespaceManager.CreateSubscription(sub`enter code here`Desc, testRule);
}
</code></pre>

<p>In a seperate project, I have a Service Bus Monitor and WorkerRole, and in the Worker Role, I have a SubscriptionClient, called "testSubscriptionClient":</p>

<pre><code>testSubscriptionClient = SubscriptionClient.CreateFromConnectionString(connectionString, _topicName, CloudConfigurationManager.GetSetting("testSubscription"), ReceiveMode.PeekLock);
</code></pre>

<p>I would then like to have OnMessage triggered when new items are placed in the service bus queue:</p>

<pre><code>testSubscriptionClient.OnMessage(PersistData);
</code></pre>

<p>However I get the following message when I run the code:</p>

<p><strong>InvalidOperationException: It is not possible for an entity that requires sessions to create a non-sessionful message receiver</strong>    </p>

<p>I am using Azure SDK v2.8.</p>

<p>Is what I am looking to do possible? Are there specific settings that I need to make in my service bus monitor, subscription client, or elsewhere that would let me retrieve messages from the subscription in this manner. As a side note, this approach works perfectly in other cases that I have in which I am not using sessioned data.</p>