summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librabbitmq/amqp.h5
-rw-r--r--librabbitmq/amqp_api.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 144dc83..19d49de 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -354,6 +354,11 @@ RABBITMQ_EXPORT amqp_rpc_reply_t amqp_basic_get(amqp_connection_state_t state,
amqp_bytes_t queue,
amqp_boolean_t no_ack);
+RABBITMQ_EXPORT int amqp_basic_reject(amqp_connection_state_t state,
+ amqp_channel_t channel,
+ uint64_t delivery_tag,
+ amqp_boolean_t requeue);
+
RABBITMQ_EXPORT struct amqp_tx_select_ok_t_ *amqp_tx_select(
amqp_connection_state_t state,
amqp_channel_t channel);
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index 456987d..cde5a93 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -251,6 +251,17 @@ amqp_rpc_reply_t amqp_basic_get(amqp_connection_state_t state,
return state->most_recent_api_result;
}
+int amqp_basic_reject(amqp_connection_state_t state,
+ amqp_channel_t channel,
+ uint64_t delivery_tag,
+ amqp_boolean_t requeue)
+{
+ amqp_basic_reject_t req;
+ req.delivery_tag = delivery_tag;
+ req.requeue = requeue;
+ return amqp_send_method(state, channel, AMQP_BASIC_REJECT_METHOD, &req);
+}
+
amqp_rpc_reply_t amqp_get_rpc_reply(amqp_connection_state_t state)
{
return state->most_recent_api_result;