Turns out that the amqp_cstring_bytes function is expecting a C string. I have fixed the issue by adding a line to the def file to disable string conversion:
Copy code
noStringConversion = amqp_cstring_bytes
After doing that I modified the amqp_basic_publish call to the following: