title: Can we have multiple subscribers to same queue in websphere MQ?
body: <p>I am trying to have multiple threads (Task) from a windows service to connect to same queue as subscribers so that I can process my messages faster. When I connect to my queues, I am receiving messages on my first subscribed thread and the rest are idle. Following is the code I am using to subscribe and receive messages:</p>
  
  <pre><code>private MQQueueManager _queueManager;
  private MQQueue _queue;
  private MQTopic _topic;
  public bool isSubscribed = false;
  
  public void Subscribe()
  {
      var queueManagerName = "myQueueManager";
      var properties = new Hashtable();
      //Set all the properties here
      _queueManager = new MQQueueManager(queueManagerName, properties);
  
      //Conect to Queue
      _queue = _queueManager.AccessQueue("devQueue", MQC.MQOO_INPUT_AS_Q_DEF);
  
      isSubscribed = true;
      while (isSubscribed)
      {
          if (cancellationToken.IsCancellationRequested)
          {
              isSubscribed = false;
              cancellationToken.ThrowIfCancellationRequested();
          }
          try
          {
              Receive(onMessageReceived);
          }
          catch (Exception ex)
          {
              Console.WriteLine("Exception: {0}", ex);
          }
      }   
  }
  
  
  public override void Receive&lt;T&gt;(Action&lt;T&gt; onMessageReceived)
  {
      try
      {
          var dataReceived = new MQMessage();
          _queue.Get(dataReceived);
  
          T message;
          message = (T)(object)dataReceived;
  
          onMessageReceived(message);     
          _queueManager.Commit();
      }
      catch (Exception ex)
      {
          throw ex;
      }
  }
  </code></pre>
  
  <p>I also tried using <code>MQC.MQOO_INPUT_SHARED</code> for accessing queue which did not work either. Am I missing something?</p>