[
https://issues.apache.org/jira/browse/ARTEMIS-1323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16117189#comment-16117189
]
Justin Bertram commented on ARTEMIS-1323:
-----------------------------------------
The documentation should be changed to accurately reflect the proper return
code from the ack (i.e. 204 rather than 200).
However, regarding the URLs in the headers the documentation is clear:
{quote}
The HEAD or GET response contains a number of custom response headers that are
URLs to additional REST resources that allow you to interact with the queue or
topic in different ways. It is important not to rely on the scheme of the URLs
returned within these headers as they are an implementation detail. Treat them
as opaque and query for them each and every time you initially interact (at
boot time) with the server. If you treat all URLs as opaque then you will be
isolated from implementation changes as the Apache ActiveMQ Artemis REST
interface evolves over time.
{quote}
Therefore, I wouldn't change the documentation that says, "...the response will
contain a new msg-acknowledge-next header that you must use to obtain the next
message."
> REST: manual acknowledgment not working as documented
> -----------------------------------------------------
>
> Key: ARTEMIS-1323
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1323
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.3.0
> Reporter: patrick peck
>
> Manually acknowledging messages in the REST interface does not work as
> documented.
> Documentation says:
> * HTTP code returned is 200
> * the response will contain a new msg-acknowledge-next header that you must
> use to obtain the next message.
> However, it actually:
> * returns HTTP code 204
> * the msg-acknowledge-next header will always be "acknowledge-next-1"
> Relevant code is at the end of method AcknowledgedQueueConsumer.acknowledge()
> {{ Response.ResponseBuilder builder = Response.noContent();
> setAcknowledgeLinks(uriInfo, basePath, builder, "-1");
> return builder.build();}}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)