decode msg from bytebuffer

https://learninghub.kx.com/forums/topic/decode-msg-from-bytebuffer

Hi kx community,

I am running to trouble while decoding msg from ByteBuffer.

The background is that I am consuming live data from solace bus, with live data feed ingested into kdb+, it is not something could be directly cast into character. What I get with the attempt to cast from binary is code like:

"\PAR1\025\004\025\010..."

Could anyone enlighten me how to decode those without routing into a java parser with ByteBuffer?


Thanks a lot.

The is a kdb+ Solace interface

  • https://solace.com/kx/
  • https://github.com/KxSystems/solace/tree/master
  • https://code.kx.com/q/wp/solace/

One of the getPayloadAs* functions may be what you need

https://github.com/KxSystems/solace/blob/77dd10edefa014f39b6c5ed9a693bdcad7685509/q/solace.q#L30



q)msg "\PAR1\025\004\025\010...

q).solace.getPayloadAsBinary msg