Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GsAmqpMessage - Default body class = String #7

Open
feldti opened this issue Apr 9, 2024 · 1 comment
Open

GsAmqpMessage - Default body class = String #7

feldti opened this issue Apr 9, 2024 · 1 comment

Comments

@feldti
Copy link

feldti commented Apr 9, 2024

This is just a note, how dangerous this setting is. The default class should be ByteArray. The developer then has to decide, if this is really a ByteArray (e.g. for an image) or it may be an UTF8 string or an CodePage string.

So far I have never come across this problem and I found the .NET binding very boring to handle all this ByteArray (from/back UTF8) and my data structure avoided german umlauts. But now I understand, that the .NET binding is useful.

Perhaps the developer must ask some header information before retrieving the body ... and do not trust, that the developer set the mime type right.

@feldti
Copy link
Author

feldti commented Apr 9, 2024

So, one programming style can be, that - if you always get the same kind of object - you may define an instance of
GsAmqEnvelope (and reuse this instance) and calls messageBodyClass: with the class in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant