vendredi 26 mars 2021

How to test JMS Spring with xml file sent to the queue and receiving the message to test for the further processing code

I am new to JMS and spring. There is a JMS in our project which receives xml messages from a queue. Once we have the message (Spring converts xml into a POJO automatically) we process it and send a results message to another web service.

  1. I would like to know what is the simplest way to simulate/mock receiving an xml message so that we can test our business logic with the message received from the queue.

  2. How to mock the web service receiving the results message so that it does not actually send the message to the web service, but I am able to check the contents of the results message? - within a method the results message is created and sent to the web service together

I do not want to locally install JMS providers or anything. I am hoping there is something simple and easy to implement to test.

Aucun commentaire:

Enregistrer un commentaire