Hi @marc.dipasquale
I am tring to do Client/Manual acknowledgement using spring cloud. First I want to know what configuration I have to do for producer end bcz I did the configuration on consumer side and its getting failed as shown below logs. I have attached java code and yaml file as well please suggest.
cid------>: null
2022-07-19 11:36:15.427 INFO 1400 — [pool-4-thread-1] com.Application : Rejecting the Message
2022-07-19 11:36:15.428 INFO 1400 — [pool-4-thread-1] backFactory$JCSMPAcknowledgementCallback : Cannot REQUEUE XMLMessage 1845175 since this flow is bound to a temporary queue, failed message will be discarded.
Hi @soniya ,
To your question about configuration on the publisher side for manual ack - There is no specific configuration you need on the producer side.
It is not clear how your code ends up in issuing a requeue acknowledgment, which is the only scenario that can throw the exception you see.
Few observations on your configuration:
a) Code is throwing a RunTimeExceptin irrespective of the ack processing - this will treat the message as rejected and to be re-delivered. On successful execution, you may just want to return and not throw an exception.
b) You are using a non-durable endpoint - SupplyOrderEventTypeNetwork1ConsumerE1 that does not have any group specified and has a single consumer (default), and a requeue acknowledgment is not possible on temporary queues.
Can you provide more info on what you are trying/verifying?
Hi @giri
Thanks For your suggestion.
I have changed the non durable queue to durable que and I am doing it for 1 consumer only. I am following this codelab, I can be worng. Currently correlation Id is null so res
t of the condition is not working. Spring Cloud Stream - Beyond the Basics…#7
Hi @soniya , Are you still getting an error - when cid is null, it defaults the value to “none”, which would have been handled by the last else block in the if-else-if code, i.e, treated as ‘reject’.
I just followed the codelab, ran this code, and for sure see the message getting rejected and due to redelivery attempt was made 3-times and finally discarded. You can also verify this in the queue stats - queued: 1, messages redelivered: 2, and discarded due to max redeliveries: 1
What do you see, maybe just share the console log output - that will help.
Thanks @giri Its working now. I am testing it through solace portal.
Can we do implematation in publisher end as well as like how I can send the CORRELATION_ID from producer to test the end to end flow from spring boot end application only.
@giri@marc.dipasquale
I have a query related to CORRELATION_ID. How I can set the value in header for CORRELATION_ID from producer side, to test end to end flow using spring cloud application only.
@giri I followed the same clodelab but for end to end testing its using solace portal and in my sceniro I want to test it from spring cloud Pub/Sub only.
So When I am trying to set CORRELATION_ID in header I am getting empty at consumer end.
@soniya I am sorry, I am not able to follow. Can you state in simple words what you’re trying to accomplish? Is it a manual message acknowledgment or something else?