Comments (9)
Looking at the code, it seems that "no requeue" is treated slightly differently from what you expect:
NoAck = not rabbit_mgmt_util:parse_bool(RequeueBin),
and then
basic_get(Ch, Q, NoAck, Enc, Trunc) ->
case amqp_channel:call(Ch, #'basic.get'{queue = Q,
no_ack = NoAck}) of
{#'basic.get_ok'{redelivered = Redelivered,
exchange = Exchange,
routing_key = RoutingKey,
message_count = MessageCount},
#amqp_msg{props = Props, payload = Payload}} ->
[{payload_bytes, size(Payload)},
{redelivered, Redelivered},
{exchange, Exchange},
{routing_key, RoutingKey},
{message_count, MessageCount},
{properties, rabbit_mgmt_format:basic_properties(Props)}] ++
payload_part(maybe_truncate(Payload, Trunc), Enc);
#'basic.get_empty'{} ->
none
end.
It other words, it is used as the noack argument to basic.get
but nothing else as far as I can tell.
from rabbitmq-management.
As @michaelklishin wrote, requeue
value is used as noack
for basic.get
.
Basically it is different the meaning of requeue
.
To use requeue
option we could set no_ack = false
and then use basic.reject
as:
basic_get(Ch, Q, Requeue, Enc, Trunc) ->
case amqp_channel:call(Ch, #'basic.get'{queue = Q,
no_ack = false}) of
{#'basic.get_ok'{redelivered = Redelivered,
exchange = Exchange,
routing_key = RoutingKey,
message_count = MessageCount,
delivery_tag = DeliveryTag},
#amqp_msg{props = Props, payload = Payload}} ->
amqp_channel:call(Ch, #'basic.reject'{delivery_tag = DeliveryTag,
requeue = Requeue}),
[{payload_bytes, size(Payload)},
{redelivered, Redelivered},
{exchange, Exchange},
{routing_key, RoutingKey},
{message_count, MessageCount},
{properties, rabbit_mgmt_format:basic_properties(Props)}] ++
payload_part(maybe_truncate(Payload, Trunc), Enc);
In this case the when you set requeue = false
the message will be redirect to the dead letter exchange (if you have one)
from rabbitmq-management.
To be more generic we could modify the requeue
with something like this:
<select name="requeue">
<option value="ack">Ack message </option>
<option value="nack">NAck message </option>
<option value="reject_false">Reject requeue false</option>
<option value="reject_true">Reject requeue true</option>
</select>
See the image here
from rabbitmq-management.
The branch rabbitmq-management-68
contains the new Get Message(s)
.
I had to change the requeue=yes/no
API with:
ackmode=ack_requeue_false
ackmode=ack_requeue_true
ackmode=reject_requeue_false
ackmode=reject_requeue_true
So, we have more options, but we lose the API compatibility.
from rabbitmq-management.
@Gsantomaggio that's fine, then it should go into 3.7.0
.
from rabbitmq-management.
@Gsantomaggio that's fine, then it should go into
3.7.0
.
It's not fine. I spend 40 minutes to find all possible options list
from rabbitmq-management.
@Yegos - could you elaborate on the trouble you had by posting a message to rabbitmq-users
? Please be sure to let us know what version of RabbitMQ and Erlang you're using.
from rabbitmq-management.
@Yegos what I meant by "fine" is that a feature release in our case allows for breaking changes. We updated HTTP API clients that we maintain as well as rabbitmqadmin
to match.
I see that the docs in the HTTP API reference do mention all possible values in the /api/queues/{vhost}/{name}/get
endpoint description. All of our docs are open source and the entire core team is on our mailing list, so your PRs and feedback on the docs is always welcome.
from rabbitmq-management.
RabbitMQ 3.7.0 release notes do mention breaking changes in the HTTP API. I added a note in bold next to this specific issue to mention that the request body expected from the client has changed.
If you have other ideas as to what can be improved, they are welcome on the list. FWIW RabbitMQ 3.7.0 has shipped 1 year ago, so at this point it's on library and tool authors who haven't caught up with the changes.
from rabbitmq-management.
Related Issues (20)
- unable to grant a user permissions to a custom topic via web ui HOT 2
- Add headers to HTTP logging HOT 2
- jquery 3.4.1 has security vulnerabilities and needs to be upgraded
- Make it possible to configure stats_event_max_backlog via new style format HOT 1
- Respect management.load_definitions for backwards compatibility
- UI fails to load with a ReferenceError: login_route is not defined in Firefox after an upgrade HOT 4
- Make it possible to configure rabbitmq_management.management_db_cache_multiplier via rabbitmq.conf
- When upgrading to a new version, JS is cached HOT 1
- Get Message can't deal unicode HOT 4
- Double encoded JSON payload 500s HOT 5
- Failed healthchecks return HTTP 200 status HOT 4
- UI: Policy definition with empty value not sent to API HOT 2
- Expose key individual health checks via HTTP API
- The 'unack' value is negative number HOT 2
- Disable HTTP OPTIONS method or make it configurable HOT 2
- unexpected_trailing_sections,{{'v1_0.delivery_annotations', HOT 1
- Missing confirm metrics from /api/exchanges/?message_stats HOT 2
- API request to aliveness-test when message-ttl is 0 results in a 500 HOT 1
- TLS listener port is reported incorrectly by `rabbitmq-diagnostics listeners` HOT 8
- Documentation: Example of Apache Reverse Proxy config does not work with 2.4+ 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 rabbitmq-management.