Hi Everyone,
I want to design a retry mechanism in case of the messages are undelivered because of queue already holding a x-max-length-bytes of contents.
When i go thru literature, i understand that we can set the mandatory field in amqp_basic_publish method and broker would respond with amqp_basic_return_t frame to indicate the reply code set to 311 content-too-large . Reference
(
https://www.rabbitmq.com/amqp-0-9-1-reference.html#domain.reply-code)
The psuedo code would look like below at the client side
//sending the message to the broker
amqp_basic_publish(conn,chan,exchange,route_key,1,0, prop,body);
//wait for frame to ensure there is no ExceedResource indicators
amqp_simple_wait_frame(conn,&frame)
if( frqme.tye is AMQP_FRAME_METHOD and method id is AMQP_BASIC_RETURN_METHOD and reply_code is 311)
resend the frame
My Question
In case broker delivers the message to the queues successfully, will client be intimated with a success. Can we do this without enabling publish confirm.
Using amqp_simple_wait_frame in publisher side throttles it, and will have impacts in terms of performance. Are there any alternatives to this strategy.
Thanks in Advance
Regards
Arun Sathyanarayanan