<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
On 07/02/2012 11:15 AM, Maurya M wrote:
<blockquote cite="mid:SNT143-W15D5044E526B26239D731DBBEA0@phx.gbl"
type="cite">
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
<div dir="ltr">
Hi,<br>
I am using the example from RabbitMQ website -
<a class="moz-txt-link-freetext" href="http://www.rabbitmq.com/devtools.html">http://www.rabbitmq.com/devtools.html</a> <a moz-do-not-send="true"
href="https://github.com/akalend/amqpcpp">- amqpcpp</a> a C++
message library for RabbitMQ.<br>
<br>
I have a need to implement the Time-To-Live feature wherein my
Publisher is in Java and Consumer in C++. <br>
I am able to declare the queue with "x-message-ttl" in my Java
Publisher but my C++ consume also needs to declare the queue
with this same "x-message-ttl"? Is my understanding correct? And
how can this be targeted using the amqpcpp - C++ library. Has
anyone of the members come across similar requirement and
cracked this one.<br>
<br>
</div>
</blockquote>
<br>
Well, looking at the constructor and declare handling code for
AMQPExchange in
<a class="moz-txt-link-freetext" href="https://github.com/akalend/amqpcpp/blob/master/src/AMQPExchange.cpp">https://github.com/akalend/amqpcpp/blob/master/src/AMQPExchange.cpp</a>,
it doesn't look like this is supported. Instead of initialising the
arguments which are passed to the underlying call to
amqp_exchange_declare (in rabbitmq-c, which amqpcpp is ostensibly
based on), the code sets the arguments to empty/null.<br>
<br>
If you want to support proper declare semantics then, you'll either
need to patch amqpcpp, or defer to using rabbitmq-c directly. <br>
<br>
Cheers,<br>
Tim<br>
</body>
</html>