Create a mock backend to return a 401 status code for the requests.
Create an API in API Manager and use the mock backend as the endpoint.
Create an application using Devportal, generate keys, and subscribe to the created API.
Start RabbitMQ, create a queue named “Rabbitqueue,” and add some messages to the queue. We used the attached sender.zip proxy which was deployed in MI for this process.
Edit the attached consumer.zip proxy with the correct clientId and clientSecret of the created application, correct tokenUrl of the API Manager, and URL of the created API as uri-template.
After deploying the consumer.zip proxy, we observed that all the messages in the "Rabbitqueue" queue are consumed by the proxy, and the rollback does not work properly.
This behavior occurs only for the 401 status code from the backend. However, if the token generation call responds with a 401, the rollback happens successfully.
Steps to Reproduce:
sender.zip consumer.zip
Following are the configs we used in the deployment.toml file of the MI for connection factories:
After deploying the consumer.zip proxy, we observed that all the messages in the "Rabbitqueue" queue are consumed by the proxy, and the rollback does not work properly.
This behavior occurs only for the 401 status code from the backend. However, if the token generation call responds with a 401, the rollback happens successfully.
Thanks, Sameera