Open utkarshk8 opened 1 year ago
Hi @utkarshk8 , thank you for reporting this issue.
CLIENT_ACKNOWLEDGE
of JMS session is consistent with PEEK-LOCK
mode, hope this can help you
Hi, @Netyyyy I've already tried that thread but it doesn't seem to work. https://github.com/Azure/azure-sdk-for-java/issues/26762#issuecomment-1057617864 This comment in that thread uses application.properties to set the acknowledge mode as Client but that's already deprecated.
HI @utkarshk8 , JMS still seems not support peek-lock mode. and if the acknowledge mode is deprecated either, we will take it into consideration. We appreciate your input and will review this matter as soon as possible. Please feel free to provide any additional information or context that you think may be helpful. We'll keep you updated on the progress of our review. Thank you for your contribution to improving our project.
Hey guys so the requirement that I have right now is to setup a Queue Listener Spring Boot Application and I am using
spring-cloud-azure-starter-servicebus-jms
for that, but the problem is the default setup mentioned here deletes the message from the queue once I receive it i.e its a destructive read.My code right now is really simple: Application name is
QueuelistenerApplication
It only contains one file right now i.e QueuelistenerApplication.java with the following code:
Now I don't want the message to be deleted from the Queue once I've consumed it, Instead what I want is to Peek the Message and Lock it, then do my operations and IF the operations are successful then I can manually acknowledge the message, but IF the operations fails then I want the message to be returned to the Queue. How can I achieve that?