PROPAGATION_REQUIRES_NEW creates a new transaction for the annotated method. If there is an existing transaction, it is suspended while the new transaction is created and committed. If the new transaction fails, it is rolled back, and the suspended transaction is resumed.
Let’s take a look at an example of how PROPAGATION_REQUIRES_NEW works. Suppose we have a service that performs two operations: one to save data to a database using Hibernate, and another to send a message to a RabbitMQ queue. We want to ensure that both operations are executed within their own transaction, such that if one operation fails, the other is not affected.