title: BrokeredMessage disposed
body: <p>I have a trouble marking my <em>BrokeredMessage</em> as Complete.</p>
  
  <p>Simple code  that works like expected:</p>
  
  <pre><code> private void OnMessageArrived(BrokeredMessage message)
   {
       var myObj= message.GetBody&lt;MyObject&gt;();
  
       //do things with myObj
  
       message.Complete();            
   }
  </code></pre>
  
  <p>When I try to wait for user to finish with <em>myObj</em> I get exception:</p>
  
  <blockquote>
    <p>brokeredmessage has been disposed </p>
  </blockquote>
  
  <p>Code below:</p>
  
  <pre><code> private Dictionary&lt;long, BrokeredMessage&gt; ReceivedMessages;      
   ReceivedMessages = new Dictionary&lt;long, BrokeredMessage&gt;();
  
   private void OnMessageArrived(BrokeredMessage message)
   {
       var myObj= message.GetBody&lt;MyObject&gt;();
       ReceivedMessages.Add(myObj.Id, message);
  
       //do things with myObj      
   }
  
   private void Button_Click(object sender, RoutedEventArgs e)
   {
       // get myObj on which user clicked
  
       ReceivedMessages[myObj.Id].Complete();
       ReceivedMessages.Remove(myObj.Id);        
   }
  </code></pre>
  
  <p>To me it looks like <em>ServiceBus</em> somehow lose connection to actual object in <em>c#</em></p>
  
  <p>Something similar to detached object in <em>EF</em>, just in this case object is detached from <em>ServiceBus</em></p>
  
  <p>EDIT:</p>
  
  <p>It is important to me to mark message as complete only after user click button. 
  In case AC goes down (or similar things) I want messages still remain on <em>Service Bus Topic</em> so that next time user start app he will again receive messages that he did not processed.</p>