I am not sure how much the yaml configuration is doing for you, but if the messages are pending then the connection is transactional and a commit or rollback needs to happen.
You don't share any yaml or java code, but what ever you have isn't performing neither a commit nor a rollback by default, which is odd. I would expect a rollback should an uncaught exception be thrown, with a default action of commit on connection close.
Looking at Seedstack documentation it seems that a normal pattern is for a session to be injected, and neither connection nor session ever closed. Which in turn indicates that you may need to perform a commit in your code.
If you have code that looks like:
@Inject
private Session session;
@Override
@Transactional
@JmsConnection("connection1")
public void sendMessage() {
Destination queue = session.createQueue("queue1");
MessageProducer producer = session.createProducer(queue);
TextMessage message = session.createTextMessage();
message.setText(stringMessage);
producer.send(message);
}
My initial thoughts are that the annotation @Transactional
should run a commit by default on exit of the method, but if it isn't then the commit needs to be on the session:
@Inject
private Session session;
@Override
@Transactional
@JmsConnection("connection1")
public void sendMessage() {
Destination queue = session.createQueue("queue1");
MessageProducer producer = session.createProducer(queue);
TextMessage message = session.createTextMessage();
message.setText(stringMessage);
producer.send(message);
session.commit();
}