Skip to content
Discussion options

You must be logged in to vote

A table of just one pair, like so:

{
  "abc": "abc"
}

Can be produced like so (start a node with RABBITMQ_ALLOW_INPUT=1 env variable set, or use rabbitmq-diagnostics remote_shell):

rabbit_binary_generator:generate_table(rabbit_misc:to_amqp_table([{<<"abc">>, longstr, <<"abc">>}])).
%% => <<3,97,98,99,83,0,0,0,3,97,98,99>>

which matches the table part in the question.

So the answer is: use long strings for argument tables. There are no benefits to using short strings, and the errata document provides a hint as to why short strings have been avoided from the early days:

A1, A2: Notice how the types CONFLICT here. In Qpid and Rabbit,
's' means a signed 16-bit integer; in 0-9-1, it means a
sh…

Replies: 6 comments 5 replies

Comment options

You must be logged in to vote
3 replies
@Sammo98
Comment options

@michaelklishin
Comment options

@michaelklishin
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Sammo98
Comment options

@michaelklishin
Comment options

Answer selected by michaelklishin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants
Converted from issue

This discussion was converted from issue #10914 on April 03, 2024 19:59.