summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--examples/amqp_consumer.c2
-rw-r--r--examples/amqp_exchange_declare.c2
-rw-r--r--examples/amqp_listen.c2
-rw-r--r--examples/amqp_listenq.c2
-rw-r--r--librabbitmq/amqp.h6
-rw-r--r--librabbitmq/amqp_api.c12
-rw-r--r--librabbitmq/amqp_socket.c8
-rw-r--r--librabbitmq/codegen.py1
-rw-r--r--tools/consume.c2
10 files changed, 20 insertions, 19 deletions
diff --git a/configure.ac b/configure.ac
index 904d4ef..be7e695 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ AC_ARG_ENABLE(64-bit,
AC_MSG_CHECKING(location of AMQP codegen directory)
sibling_codegen_dir="$ac_abs_confdir/../rabbitmq-codegen"
AMQP_CODEGEN_DIR=$(test -d "$sibling_codegen_dir" && echo "$sibling_codegen_dir" || echo "$ac_abs_confdir/codegen")
-AMQP_SPEC_JSON_PATH="$AMQP_CODEGEN_DIR/amqp-rabbitmq-0.8.json"
+AMQP_SPEC_JSON_PATH="$AMQP_CODEGEN_DIR/amqp-rabbitmq-0.9.1.json"
if test -f "$AMQP_SPEC_JSON_PATH"
then
diff --git a/examples/amqp_consumer.c b/examples/amqp_consumer.c
index 803e228..b1754f5 100644
--- a/examples/amqp_consumer.c
+++ b/examples/amqp_consumer.c
@@ -177,7 +177,7 @@ int main(int argc, char const * const *argv) {
AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding queue");
- amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0);
+ amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
run(conn);
diff --git a/examples/amqp_exchange_declare.c b/examples/amqp_exchange_declare.c
index 27bff1a..e77ac52 100644
--- a/examples/amqp_exchange_declare.c
+++ b/examples/amqp_exchange_declare.c
@@ -89,7 +89,7 @@ int main(int argc, char const * const *argv) {
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
amqp_exchange_declare(conn, 1, amqp_cstring_bytes(exchange), amqp_cstring_bytes(exchangetype),
- 0, 0, 0, AMQP_EMPTY_TABLE);
+ 0, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Declaring exchange");
die_on_amqp_error(amqp_channel_close(conn, 1, AMQP_REPLY_SUCCESS), "Closing channel");
diff --git a/examples/amqp_listen.c b/examples/amqp_listen.c
index 3e56008..f208652 100644
--- a/examples/amqp_listen.c
+++ b/examples/amqp_listen.c
@@ -109,7 +109,7 @@ int main(int argc, char const * const *argv) {
AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Binding queue");
- amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0);
+ amqp_basic_consume(conn, 1, queuename, AMQP_EMPTY_BYTES, 0, 1, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
{
diff --git a/examples/amqp_listenq.c b/examples/amqp_listenq.c
index 0fbce51..98c389f 100644
--- a/examples/amqp_listenq.c
+++ b/examples/amqp_listenq.c
@@ -90,7 +90,7 @@ int main(int argc, char const * const *argv) {
amqp_channel_open(conn, 1);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Opening channel");
- amqp_basic_consume(conn, 1, amqp_cstring_bytes(queuename), AMQP_EMPTY_BYTES, 0, 0, 0);
+ amqp_basic_consume(conn, 1, amqp_cstring_bytes(queuename), AMQP_EMPTY_BYTES, 0, 0, 0, AMQP_EMPTY_TABLE);
die_on_amqp_error(amqp_get_rpc_reply(conn), "Consuming");
{
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index 7f4593f..40c8292 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -412,7 +412,6 @@ extern struct amqp_exchange_declare_ok_t_ *amqp_exchange_declare(amqp_connection
amqp_bytes_t type,
amqp_boolean_t passive,
amqp_boolean_t durable,
- amqp_boolean_t auto_delete,
amqp_table_t arguments);
extern struct amqp_queue_declare_ok_t_ *amqp_queue_declare(amqp_connection_state_t state,
@@ -441,7 +440,7 @@ extern struct amqp_queue_unbind_ok_t_ *amqp_queue_unbind(amqp_connection_state_t
amqp_channel_t channel,
amqp_bytes_t queue,
amqp_bytes_t exchange,
- amqp_bytes_t binding_key,
+ amqp_bytes_t routing_key,
amqp_table_t arguments);
extern struct amqp_basic_consume_ok_t_ *amqp_basic_consume(amqp_connection_state_t state,
@@ -450,7 +449,8 @@ extern struct amqp_basic_consume_ok_t_ *amqp_basic_consume(amqp_connection_state
amqp_bytes_t consumer_tag,
amqp_boolean_t no_local,
amqp_boolean_t no_ack,
- amqp_boolean_t exclusive);
+ amqp_boolean_t exclusive,
+ amqp_table_t filter);
extern int amqp_basic_ack(amqp_connection_state_t state,
amqp_channel_t channel,
diff --git a/librabbitmq/amqp_api.c b/librabbitmq/amqp_api.c
index 2b1ed54..b2793ff 100644
--- a/librabbitmq/amqp_api.c
+++ b/librabbitmq/amqp_api.c
@@ -196,13 +196,12 @@ amqp_exchange_declare_ok_t *amqp_exchange_declare(amqp_connection_state_t state,
amqp_bytes_t type,
amqp_boolean_t passive,
amqp_boolean_t durable,
- amqp_boolean_t auto_delete,
amqp_table_t arguments)
{
state->most_recent_api_result =
AMQP_SIMPLE_RPC(state, channel, EXCHANGE, DECLARE, DECLARE_OK,
amqp_exchange_declare_t,
- 0, exchange, type, passive, durable, auto_delete, 0, 0, arguments);
+ 0, exchange, type, passive, durable, 0, 0, 0, arguments);
return RPC_REPLY(amqp_exchange_declare_ok_t);
}
@@ -253,13 +252,13 @@ amqp_queue_unbind_ok_t *amqp_queue_unbind(amqp_connection_state_t state,
amqp_channel_t channel,
amqp_bytes_t queue,
amqp_bytes_t exchange,
- amqp_bytes_t binding_key,
+ amqp_bytes_t routing_key,
amqp_table_t arguments)
{
state->most_recent_api_result =
AMQP_SIMPLE_RPC(state, channel, QUEUE, UNBIND, UNBIND_OK,
amqp_queue_unbind_t,
- 0, queue, exchange, binding_key, arguments);
+ 0, queue, exchange, routing_key, arguments);
return RPC_REPLY(amqp_queue_unbind_ok_t);
}
@@ -269,12 +268,13 @@ amqp_basic_consume_ok_t *amqp_basic_consume(amqp_connection_state_t state,
amqp_bytes_t consumer_tag,
amqp_boolean_t no_local,
amqp_boolean_t no_ack,
- amqp_boolean_t exclusive)
+ amqp_boolean_t exclusive,
+ amqp_table_t filter)
{
state->most_recent_api_result =
AMQP_SIMPLE_RPC(state, channel, BASIC, CONSUME, CONSUME_OK,
amqp_basic_consume_t,
- 0, queue, consumer_tag, no_local, no_ack, exclusive, 0);
+ 0, queue, consumer_tag, no_local, no_ack, exclusive, 0, filter);
return RPC_REPLY(amqp_basic_consume_ok_t);
}
diff --git a/librabbitmq/amqp_socket.c b/librabbitmq/amqp_socket.c
index d39f29d..13f6376 100644
--- a/librabbitmq/amqp_socket.c
+++ b/librabbitmq/amqp_socket.c
@@ -104,10 +104,10 @@ static char *header() {
header[1] = 'M';
header[2] = 'Q';
header[3] = 'P';
- header[4] = 1;
- header[5] = 1;
- header[6] = AMQP_PROTOCOL_VERSION_MAJOR;
- header[7] = AMQP_PROTOCOL_VERSION_MINOR;
+ header[4] = 0;
+ header[5] = AMQP_PROTOCOL_VERSION_MAJOR;
+ header[6] = AMQP_PROTOCOL_VERSION_MINOR;
+ header[7] = AMQP_PROTOCOL_VERSION_REVISION;
return header;
}
diff --git a/librabbitmq/codegen.py b/librabbitmq/codegen.py
index 6b38666..f911966 100644
--- a/librabbitmq/codegen.py
+++ b/librabbitmq/codegen.py
@@ -417,6 +417,7 @@ extern "C" {
"""
print "#define AMQP_PROTOCOL_VERSION_MAJOR %d" % (spec.major)
print "#define AMQP_PROTOCOL_VERSION_MINOR %d" % (spec.minor)
+ print "#define AMQP_PROTOCOL_VERSION_REVISION %d" % (spec.revision)
print "#define AMQP_PROTOCOL_PORT %d" % (spec.port)
for (c,v,cls) in spec.constants:
diff --git a/tools/consume.c b/tools/consume.c
index 943406b..34037d9 100644
--- a/tools/consume.c
+++ b/tools/consume.c
@@ -132,7 +132,7 @@ static void do_consume(amqp_connection_state_t conn, amqp_bytes_t queue,
int no_ack, const char * const *argv)
{
if (!amqp_basic_consume(conn, 1, queue, AMQP_EMPTY_BYTES, 0, no_ack,
- 0))
+ 0, AMQP_EMPTY_TABLE))
die_rpc(amqp_get_rpc_reply(conn), "basic.consume");
for (;;) {