summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Antonuk <alan.antonuk@gmail.com>2014-09-01 17:20:07 -0700
committerAlan Antonuk <alan.antonuk@gmail.com>2014-09-01 17:22:16 -0700
commit8b448c6a0d073376614928a18eed101092d3044a (patch)
tree7596f3eeb4d0dc417239ea63f9682eb487d04761
parentbfd8cc9129da46136691a88c06d505b78f0043ae (diff)
downloadrabbitmq-c-github-ask-8b448c6a0d073376614928a18eed101092d3044a.tar.gz
Print message body in amqp[s]_listen[q] examples.
This fixes #199.
-rw-r--r--README.md3
-rw-r--r--examples/amqp_listen.c3
-rw-r--r--examples/amqp_listenq.c3
-rw-r--r--examples/amqps_listen.c3
-rw-r--r--examples/amqps_listenq.c3
5 files changed, 12 insertions, 3 deletions
diff --git a/README.md b/README.md
index b7ce488..4f62ce9 100644
--- a/README.md
+++ b/README.md
@@ -113,9 +113,6 @@ In another terminal,
You should see output similar to the following in the listener's
terminal window:
- Result 1
- Frame type 1, channel 1
- Method AMQP_BASIC_DELIVER_METHOD
Delivery 1, exchange amq.direct routingkey test
Content-type: text/plain
----
diff --git a/examples/amqp_listen.c b/examples/amqp_listen.c
index ca7d538..3f86830 100644
--- a/examples/amqp_listen.c
+++ b/examples/amqp_listen.c
@@ -126,6 +126,9 @@ int main(int argc, char const *const *argv)
(int) envelope.message.properties.content_type.len,
(char *) envelope.message.properties.content_type.bytes);
}
+ printf("----\n");
+
+ amqp_dump(envelope.message.body.bytes, envelope.message.body.len);
amqp_destroy_envelope(&envelope);
}
diff --git a/examples/amqp_listenq.c b/examples/amqp_listenq.c
index b2e8094..3735645 100644
--- a/examples/amqp_listenq.c
+++ b/examples/amqp_listenq.c
@@ -107,6 +107,9 @@ int main(int argc, char const *const *argv)
(int) envelope.message.properties.content_type.len,
(char *) envelope.message.properties.content_type.bytes);
}
+ printf("----\n");
+
+ amqp_dump(envelope.message.body.bytes, envelope.message.body.len);
amqp_destroy_envelope(&envelope);
}
diff --git a/examples/amqps_listen.c b/examples/amqps_listen.c
index 44bb88c..fe1b86f 100644
--- a/examples/amqps_listen.c
+++ b/examples/amqps_listen.c
@@ -143,6 +143,9 @@ int main(int argc, char const *const *argv)
(int) envelope.message.properties.content_type.len,
(char *) envelope.message.properties.content_type.bytes);
}
+ printf("----\n");
+
+ amqp_dump(envelope.message.body.bytes, envelope.message.body.len);
amqp_destroy_envelope(&envelope);
}
diff --git a/examples/amqps_listenq.c b/examples/amqps_listenq.c
index 6643500..b00b50e 100644
--- a/examples/amqps_listenq.c
+++ b/examples/amqps_listenq.c
@@ -124,6 +124,9 @@ int main(int argc, char const *const *argv)
(int) envelope.message.properties.content_type.len,
(char *) envelope.message.properties.content_type.bytes);
}
+ printf("----\n");
+
+ amqp_dump(envelope.message.body.bytes, envelope.message.body.len);
amqp_destroy_envelope(&envelope);
}