🎄 Happy Holidays! 🥳

Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.

Happy Holidays!

Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.

SolaceSystems.Solclient.Messaging.OperationErrorException

In my application I am creating a solace message "CreateMessage()". After that i am converting message to stream using "SolaceSystems.Solclient.Messaging.SDT.SDTUtils.CreateStream(solaceMessage, 10240)".
While writing in stream in a loop I am getting below exception after some iteration in the loop.

"SolaceSystems.Solclient.Messaging.OperationErrorException: 'Failed to add string field in IStreamContainer with value: "
Can you please help why i am getting this error?

P.S. I have already set "SocketReceiveBufferSizeInBytes" to 1024*1024.

Thanks,
Prasoon

Comments

  • Aaron
    Aaron Member, Administrator, Moderator, Employee Posts: 644 admin

    Hi @prasoonSolace ..! Value looks blank... are you trying to insert an empty String? I'm not sure that's allowed in a SDTStream..?

    Also, I'm just curious why you are using the Solace SDT type? I mean, they're useful and all, but they are a Solace-specific format. So if you want to use non-Solace APIs (e.g. MQTT, AMQP, etc.) then they wouldn't be able to decode. Usually people are just using JSON or YAML or Google ProtoBufs or something instead, attaching them as a TextMessage or BtyesMessage, rather than using the SDT StreamMessage. Thoughts?

  • prasoonSolace
    prasoonSolace Member Posts: 9

    Hi,
    My problem got solved. The issue was, in between the code new stream was getting created and in that new stream SDT field was added because of which issue was coming. After rectifying that my problem got solved.