Skip to content

unsigned 8 bit number field type seems not to be supported #713

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

Closed
ByteAlex opened this issue Nov 5, 2021 · 3 comments · Fixed by #714
Closed

unsigned 8 bit number field type seems not to be supported #713

ByteAlex opened this issue Nov 5, 2021 · 3 comments · Fixed by #714
Labels
Milestone

Comments

@ByteAlex
Copy link
Contributor

ByteAlex commented Nov 5, 2021

Library version: 5.13.1

Error Log:
01:01:34.258 [AMQP Connection XXXXXXXX:XXXX] ERROR com.rabbitmq.client.impl.ForgivingExceptionHandler - An unexpected connection driver error occurred com.rabbitmq.client.MalformedFrameException: Unrecognised type in table at com.rabbitmq.client.impl.ValueReader.readFieldValue(ValueReader.java:214) at com.rabbitmq.client.impl.ValueReader.readTable(ValueReader.java:150) at com.rabbitmq.client.impl.ValueReader.readTable(ValueReader.java:252) at com.rabbitmq.client.impl.ContentHeaderPropertyReader.readTable(ContentHeaderPropertyReader.java:108) at com.rabbitmq.client.AMQP$BasicProperties.<init>(AMQP.java:1716) at com.rabbitmq.client.impl.AMQImpl.readContentHeaderFrom(AMQImpl.java:4845) at com.rabbitmq.client.impl.CommandAssembler.consumeHeaderFrame(CommandAssembler.java:101) at com.rabbitmq.client.impl.CommandAssembler.handleFrame(CommandAssembler.java:158) at com.rabbitmq.client.impl.AMQCommand.handleFrame(AMQCommand.java:89) at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:112) at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:739) at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47) at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:666) at java.base/java.lang.Thread.run(Thread.java:832)

Steps to reproduce:
Dispatch an amqp payload with table type B: unsigned 8 bit number
Try to receive said payload with the java client.

Expected result:
Client parses the payload successfully.

Actual result:
Client fails to parse the result.

Current workaround:
Instead of using u8, I'm sending a u16.

Suggested fix:
Append type B to the switch in ValueReader.java:161

Thanks for reading!

@michaelklishin
Copy link
Contributor

@ByteAlex if a type is missing for over a decade and no one complains, I'd say it's a wontfix but you are welcome to submit a PR.

@michaelklishin
Copy link
Contributor

Before you do anything, please carefully go through this part of the AMQP 0-9-1 Errata document.

@ByteAlex
Copy link
Contributor Author

ByteAlex commented Nov 5, 2021

Thank you for your guidance here. After reading the mentioned document it seems like the B type should be implemented by RabbitMQ. I'll open a PR to add this; it should be fairly simple!

@acogoluegnes acogoluegnes modified the milestones: 5.13.2, 5.14.0 Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants