/// <summary>Called when a message has been received.</summary>
        /// <param name="receiver">The receiver.</param>
        /// <param name="message">The message.</param>
        public void MessageReceived(Receiver receiver, Org.Apache.Qpid.Messaging.Message message)
        {
            var contentBytes = new byte[message.ContentSize];
            message.GetContent(contentBytes);

            var amqpMessage = new Message
            {
                ContentBytes = contentBytes,
                ContentType = message.ContentType,
                Properties = message.Properties.ToDictionary(p => p.Key, p => p.Value)
            };

            MessageReceivedCallback(amqpMessage);
            receiver.Session.Acknowledge(message);
        }