/// <summary>
 ///   Moves the given message to the configured error queue.
 /// </summary>
 /// <param name = "m"></param>
 protected void MoveToErrorQueue(IBM.XMS.IMessage m)
 {
     using(var producer = producerProvider.GetProducer(errorDestination))
     {
         if(m is IBytesMessage)
         {
             var toSend = producer.CreateBytesMessage();
             XmsUtilities.PopulateErrorQueueMessage(toSend, (IBytesMessage)m, inputDestination);
             producer.Send(m);
         }
         else
         {
             log.Error("Received message of type {0} which is not supported. This message will be ignored.".FormatWith(m.GetType()));
         }
     }
 }