We have little experience using RabbitMQ in general on the qpid project;
perhaps you can mention at the protocol level what setting this option on a
message means for RabbitMQ?

For AMQP the concept of 'TTL" exists in 3 different related C++ Message
APIs aside from any RabbitMQ specific option/message property:

   - proton::message::ttl
   This is in the header section of a message it is intended to be used by
   the messaging transport infrastructure to ensure that messages don't get
   forwarded endlessly and are eventually discarded if they are in a loop.
   This value is set using proton::duration (relative time). It should be
   decreased by the message transport infrastructure and if it reaches 0 then
   the message should be discarded (or dead lettered). From the context I
   don't think this is what you are referring to.
   - proton::message::creation_time & proton::message::expiry_time
   Together these are part of the immutable message itself and represent
   that the message has a limited period of validity. These values are set in
   the proton::timestamp type (absolute time). A message broker should use
   both the creation and expiry time together to decide if a message is still
   valid, and can dead letter messages no longer valid.

If RabbitMQ does not use any of these standard AMQP ttl related message
fields then I expect you are trying to set a custom application property on
a message:

   - proton::message::properties
   Something like:
   proton::message m;
   m.properties().put("x_message_ttl", 1000_000ul);

Also note that using an underscore is non-standard in the RFC world I wouod
expect the property to be called "x-message-ttl" - you might want to check.

Hope this is of some use.

Andrew


On Wed, Dec 11, 2024 at 12:04 PM Andrey Polikarpov <p.andre...@yandex.com>
wrote:

> Hey.
> I am using qpid proton cpp 0.37.0
> How to set rabbitmq option `x_message_ttl` option for all queue?
>
> Many thanks!
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@qpid.apache.org
> For additional commands, e-mail: users-h...@qpid.apache.org
>
>

Reply via email to