[rabbitmq-discuss] ? short-string encoding and rabbitmq 2.0.1

james anderson james.anderson at setf.de
Fri Oct 22 12:44:22 BST 2010


good morning;

the grammar on page 31 of amqp0-9-1.pdf[1] describes an encoding for  
field-values in field-tables which would permit short strings to be  
encoded as 's'<length><data>.

i am running rabbitmg, version 2.1.0-1, installed as per the download  
page[2].

if i attempt to send to that server a basic.publish for which the  
properties includes a field table which contains a short string, the  
request causes an exception, and the respective connection appears to  
be rendered zombie. the error report is:

=ERROR REPORT==== 22-Oct-2010::00:07:02 ===
** Generic server <0.23205.8> terminating
** Last message in was {'$gen_cast',
                            {method,
                                {'basic.publish',0,<<"spocq.store">>,
                                    <<"foaf">>,false,false},
                                {content,60,none,
                                     
<<255,248,10,84,69,88,84,47,80,76,65,73,78,
                                       
10,73,83,79,45,56,56,53,57,45,49,0,0,0,48,
                                       
12,69,76,69,77,69,78,84,45,84,89,80,69,
                                       
115,6,83,84,82,73,78,71,7,80,65,67,75,65,
                                       
71,69,115,17,68,69,46,83,69,84,70,46,65,
                                       
77,81,80,46,85,83,69,82,1,0,0,0,0,0,0,0,0,
                                      0,0,0,0,0,0,0,0>>,
                                    rabbit_framing_amqp_0_9_1,
                                    [<<"a test message">>]}}}
** When Server state == {ch,running,1,<0.23202.8>,<0.23204.8>,undefined,
                             #Fun<rabbit_channel_sup.0.58069862>,none,
                             {set,0,16,16,8,80,48,
                                  {[],[],[],[],[],[],[],[],[],[],[], 
[],[],[],
                                   [],[]},
                                  {{[],[],[],[],[],[],[],[],[],[],[], 
[],[],[],
                                    [],[]}}},
                             1,
                             {[],[]},
                             {[],[]},
                             <<"guest">>,<<"/">>,<<"spocq.store">>,
                             {dict,0,16,16,8,80,48,
                                   {[],[],[],[],[],[],[],[],[],[],[], 
[],[],[],
                                    [],[]},
                                   {{[],[],[],[],[],[],[],[],[],[],[], 
[],[],[],
                                     [],[]}}},
                             {dict,0,16,16,8,80,48,
                                   {[],[],[],[],[],[],[],[],[],[],[], 
[],[],[],
                                    [],[]},
                                   {{[],[],[],[],[],[],[],[],[],[],[], 
[],[],[],
                                     [],[]}}},
                             <0.23201.8>,
                             {state,none,undefined}}
** Reason for termination ==
** {function_clause,
        [{rabbit_binary_parser,parse_table,
              
[<<84,82,73,78,71,7,80,65,67,75,65,71,69,115,17,68,69,46,83,69,
                84,70,46,65,77,81,80,46,85,83,69,82>>]},
         {rabbit_binary_parser,parse_table,1},
         {rabbit_binary_parser,parse_property,2},
         {rabbit_binary_parser,parse_properties,6},
         {rabbit_framing_amqp_0_9_1,decode_properties,2},
         {rabbit_binary_parser,ensure_content_decoded,1},
         {rabbit_channel,handle_method,3},
         {rabbit_channel,handle_cast,2}]}

i understand this, and the code in the repository[3] to indicate that  
the 115,6,83 at the start of the fourth line of the content vector,  
above, was decoded as a short 16/signed instead of the intended six  
byte short string. given which state, the subsequent vector  
<<84,82,73,78,71,7,80, ...>> matched no pattern. do i understand  
these events correctly?


---
[1] https://www.amqp.org/confluence/download/attachments/720900/ 
amqp0-9-1.pdf
[2] http://www.rabbitmq.com/debian.html#apt
[3] http://hg.rabbitmq.com/rabbitmq-server/file/ec44d2fa3842/src/ 
rabbit_binary_parser.erl#l57


More information about the rabbitmq-discuss mailing list