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

Type tags #646

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Type tags #646

wants to merge 2 commits into from

Conversation

MaxKirillov
Copy link

@MaxKirillov MaxKirillov commented Sep 7, 2021

Hey there! Recently we faced TypeError: Unexpected type tag "L"...
So added more types according to # 4.2.1 Formal Protocol Grammar (AMQP Protocol Specification https://www.rabbitmq.com/resources/specs/amqp0-9-1.pdf)

@squaremo
Copy link
Collaborator

squaremo commented Sep 15, 2021

The types as given in the AMQP 0-9-1 spec are problematic -- they are inconsistent, and don't match what servers and clients actually implement (see https://www.rabbitmq.com/amqp-0-9-1-errata.html#section_3). It's a bit of a mess.

I based the type tags here on what RabbitMQ understands, as a matter of practicality. Here's the RabbitMQ server code: https://github.com/rabbitmq/rabbitmq-common/blob/master/src/rabbit_binary_parser.erl#L30; and here's the Java client (the longest running client, iirc): https://github.com/rabbitmq/rabbitmq-java-client/blob/main/src/main/java/com/rabbitmq/client/impl/ValueReader.java#L158. Note the server code understands 'L', but treats it the same as (lowercase L) 'l' and reads a signed integer.

I'm interested to know how you got a field table with an unexpected type tag -- do you know which client implemented encoded it?

@ebrinette
Copy link

Hello !

To answer your question, this is used by the rabbitmq-c library.

You can add AMQP_FIELD_KIND_U16 in the header table.

What's currently blocking #620 ?

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

Successfully merging this pull request may close these issues.

4 participants