Git Product home page Git Product logo

Comments (5)

streadway avatar streadway commented on July 17, 2024 13

The PRECONDITION_FAILED is because the queue has already been declared without x-message-ttl and when trying to declare it again with a x-message-ttl, the declare fails because the arguments of the declares are different. Try deleting the queue, then declare it with a int32 x-message-ttl.

from amqp.

streadway avatar streadway commented on July 17, 2024 3

It looks like rabbitmq doesn't know how to parse values tagged with 'i' (unsigned int32) and it crashes the connection. The java library sends a signed 32 bit integer from the example.

This should work for you:

    args["x-message-ttl"] = int32(900000)

from amqp.

maggedotno avatar maggedotno commented on July 17, 2024 2

Yes, sorry, just read up on that now (https://jira.springsource.org/secure/attachment/20196/AMQP-265.txt).

Works like a charm after deleting the existing queue.

Thank you for making this lib and thank you for helping! ๐Ÿ‘

from amqp.

streadway avatar streadway commented on July 17, 2024

It's likely a bug in the table tags used during serialization. I went strictly from the 0.9.1 spec, but there were some changes between 0.8, 0.10, 0.9 and 0.9.1. The server may expect a different tag for the value and closed the connection (the 501 error). Your server log should show what exactly went wrong.

What server and version are you using?

from amqp.

maggedotno avatar maggedotno commented on July 17, 2024

RabbitMQ 3.0.2, Erlang R15B02.

When running with uint32 I get the following in the log:

=CRASH REPORT==== 19-May-2013::17:23:34 ===
  crasher:
    initial call: rabbit_reader:init/4
    pid: <0.14298.0>
    registered_name: []
    exception error: no function clause matching
                     rabbit_binary_parser:parse_field_value(<<105,0,13,187,
                                                              160,22,120,45,
                                                              100,101,97,100,
                                                              45,108,101,116,
                                                              116,101,114,45,
                                                              101,120,99,104,
                                                              97,110,103,101,
                                                              83,0,0,0,23,115,
                                                              111,97,109,111,
                                                              110,46,114,101,
                                                              113,117,101,115,
                                                              116,45,105,110,
                                                              99,111,109,105,
                                                              110,103>>) (src/rabbit_binary_parser.erl, line 53)
      in function  rabbit_binary_parser:parse_table/1 (src/rabbit_binary_parser.erl, line 44)
      in call from rabbit_framing_amqp_0_9_1:decode_method_fields/2 (src/rabbit_framing_amqp_0_9_1.erl, line 753)
      in call from rabbit_command_assembler:process/2 (src/rabbit_command_assembler.erl, line 85)
      in call from rabbit_reader:process_channel_frame/3 (src/rabbit_reader.erl, line 608)
      in call from rabbit_reader:process_frame/3 (src/rabbit_reader.erl, line 601)
      in call from rabbit_reader:handle_input/3 (src/rabbit_reader.erl, line 653)
      in call from rabbit_reader:recvloop/2 (src/rabbit_reader.erl, line 274)
    ancestors: [<0.14295.0>,rabbit_tcp_client_sup,rabbit_sup,<0.158.0>]
    messages: [{'EXIT',#Port<0.20117>,normal}]
    links: [<0.14295.0>]
    dictionary: [{{channel,1},
                   {<0.14304.0>,{method,rabbit_framing_amqp_0_9_1}}},
                  {{ch_pid,<0.14304.0>},{1,#Ref<0.0.1.179206>}}]
    trap_exit: true
    status: running
    heap_size: 2584
    stack_size: 24
    reductions: 2601
  neighbours:

I also tried with signed int as suggested but it complains with a PRECONDITION_FAILED again.

"PRECONDITION_FAILED - inequivalent arg 'x-message-ttl'for queue 'soamon.requests-dead' in vhost 'soamon': received the value '900000' of type 'signedint' but current is none"

from amqp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.