Example #1
0
        public override void Put(Message message, object transaction)
        {
            if (DisposeStarted)
            {
                return;
            }

            var channel = message.Channel;

            if (channel.IsNullOrWhiteSpace())
            {
                channel = m_DefaultChannel;
            }

            var doc = m_Serializer.Serialize(message, KNOWN_TYPES);

            var map = Mapper.StoreMap(message.ArchiveDimensions);

            if (map != null)
            {
                foreach (var item in map)
                {
                    doc.Set(RowConverter.String_CLRtoBSON("__" + item.Key, item.Value));
                }
            }

            m_Database[channel].Insert(doc);
        }