As part of the development of a middleware, I need to choose between two mechanisms to do asynchronous processing (with the possibility of replaying failure cases) I have as ideas the two following techniques:
Use the MQ queues (during an error, insert a message in the rejection queue and replay it later)
Use a database to store the cases of failure, and turn a batch to replay them later.
The technical environment is Java (jdlk 8 + wildfly + REST web services as a middleware entry point)
Can you orient me by comparing advantages and inconvinients of the two techniques, and if there is a better solution it will be welcome.
Thanks in advance for your help.