I would like to create a flow and instead of using the messageEventHandler
delegate I would like to have the messages be queued internally and call them by using ReceiveMsg(Int32)
.
However when I pass null into the CreateFlow
method for messageEventHandler
, I receive the attached error.
All in all, I would like to be able to get the message at the specific times and not whenever the delegate gets triggered.
You must specify the messageEventHandler
delegate. The Solace .NET API only provides asynchronous callbacks for received messages.
As an alternative, you could have your application temporary store the received messages in an internal buffer, and only read and acknowledge them when ready.
FlowProperties.MaxUnackedMessages
and FlowProperties.WindowSize
should also be set to a small value (such as 1) to prevent the buffer from overflowing.