Closed RobbinKok closed 1 month ago
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @EldertGrootenboer.
@RobbinKok thanks for reporting the issue. Our Service Bus package provides customers a convenience of attempt to decode the message body as JSON object. This may not be desired. I don't know for sure whether your issue is related yet, but one quick thing to try is use the skipParsingBodyAsJson: true,
option when creating the receiver. Could you please give it a try to see if there's any difference?
The option skipParsingBodyAsJson: true
, didn't change anything in the message. This is part of the message with it set to true:
This is the same part of the message with it turned to false/ turned off:
For context, this is how the message (a string) looks like when we send it to the service bus:
@RobbinKok thank you for testing the option! We don't apply other transformations when receiving messages so this puzzled me. How was your large dataset sent to Azure Service Bus? via JS SDK client, SDK in another programming language, or some other tools?
When the dataset is too big, the service bus sends a Buffer to the client.
Does this mean that sometimes your code receives a Buffer, and sometimes it receives a non-Buffer when the dataset is not too big?
I just tried receiving a JSON of 20000 lines (size > 256 KB) but didn't have any issue. @RobbinKok If you could share more details, if possible a randomly generated JSON that demonstrates the issue would be great!
From the looks of it our sending mechanism (other system and a java application) uses some sort of compression mechanism. I've asked the team that works on it to clarify what exactly happens with a message before its send and what compression it uses. Looks like something goes wrong with the compression, but I'll update you when I know it for sure
Got a response from the backend team and they changed the compression algorithm without notifying. Closing this issue now, since it has nothing to do with the service bus
Describe the bug When the dataset is too big, the service bus sends a Buffer to the client. When translating that buffer to a string, a lot of special characters (like
›☺☻→☻o
) are added to the message, even though I know for sure that they aren't there when we send te message to the queue. With smaller messages that are the simular, it just sends the message with converting it into a buffer first and in there the data doesnt contain the special characters. I tried to conversion from a buffer to a string using utf-8, utf8, win-1252 and all inserted different special characters.To Reproduce Steps to reproduce the behavior:
Expected behavior The expected behavior would be that the data stays the same when you decode the buffer.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.