Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Operation is not valid due to the current state of the object when save message with redis #1219

Open
LovelyYanki opened this Issue · 0 comments

1 participant

Lee Ho Yeung
Lee Ho Yeung

after using wrapper, large volume from queue, got this error:

initially there is no error when it save, after several minutes, it got this error and i discover dump.rdb maintain at 1 KB size. it seems do not change after large volume save message

Operation is not valid due to the current state of the object

at RedisClass.GetInstnace().Store(Msg)

if (SQLQueue == null)
SQLQueue = new ConcurrentQueue();
SQLQueue.TryDequeue(out BloomberMsg);
if (BloomberMsg != null)
{
RedisClass.GetInstnace().Store(BloomberMsg);
RedisClass.GetInstnace().Save();
}

public class BloomMsg
{
public Message msg {get; set;}
public String TypeOfMsg { get; set; }

    }

foreach (Message msg in eventObj)
{
logger.Debug(msg.ToString());
if (SQLQueue == null)
SQLQueue = new ConcurrentQueue();

                BloomMsg b = new BloomMsg();
                b.msg = msg;
                b.TypeOfMsg = TypeOfMsg;
                SQLQueue.Enqueue(b);

            }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.