Comments (5)
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.
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.
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.
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.
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)
- AMQPLAIN authentication does not work
- incorrect bindings in management UI
- Why use struct instead of pointer๏ผ HOT 1
- Channel blocks despite connection is closed HOT 5
- Adding a note that this repo has moved to github.com/rabbitmq/amqp091-go
- failed to dail() when password contains with special characters like "#"
- TestTLSHandshake failing with Go 1.18 due to denial of SHA1 certificates HOT 1
- How to get one message from queue
- consume stops receiving messages after reconnecting HOT 1
- RabbitMQ has open connections(Too many File descriptors piling up on broker) for publish HOT 1
- Documentation contradiction in regards to flow
- When I consume from a queue, the queue goes up HOT 3
- Coverity Scan - Identical code for different branches
- How do I use a proxy server to connect?
- tls problem
- Tagging
- Error sending to queue
- channel.Confirm hangs
- Error consuming from a queue that contains data packaged with msgpack
- if the Conn:Channel ratio is not 1:1 please help me understand API HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amqp.