Shixin Song <Shixin.Song at markit.com> writes:
I get the general idea about how to deal with it. Now I am looking at
the first solution which to tell rabbit drop the message when it's too
old. I saw the sample code from the link indicating how to do it in
Java. But I am using C client library at this moment. It seems that
there is no queue declare interface at this moment. Could you indicate
me that how to do it in C library.
There is a amqp_queue_declare function in the librabbitmq API. You canthe first solution which to tell rabbit drop the message when it's too
old. I saw the sample code from the link indicating how to do it in
Java. But I am using C client library at this moment. It seems that
there is no queue declare interface at this moment. Could you indicate
me that how to do it in C library.
find examples of its use in examples/amqp_listen.c and
tools/declare_queue.c.
What's not there is an example of how to pass a non-empty arguments
table. You can find code that constructs tables in tests/test_tables.c,
so maybe you can figure it out from there. If not, let me know, and
I'll put an example together.
David
--
David Wragg
Staff Engineer, RabbitMQ
SpringSource, a division of VMware