UniversalMessaging: How to create a durable subscriber for JMS?

Hello,

I’m trying to read messages from UM using the JMS API. The messages are published by an Integration Server (IS), but that should not be relevant in this context. I’m on UM 9.12.

I created a small program using SpringBoot and its message driven POJO feature.

In the EnterpriseManager, I’ve created a JNDI entry for the channel (the channel itself was created when the publishable IS document type was created) and a JNDI entry for the Topic Connections Factories.

Everything seems to be working OK, i.e. when I publish a document in IS (it’s called like that there), my message driven POJO in the Java program gets activated, and I can consume the message.

The problem is: it works only if the receiver program is running. If documents are published when the receiving program is down, they are lost, i.e. when I start the receiving program, it does not pick up those messages.

In the EnterpriseManager, I don’t see any child nodes for the channel node. This means (IMO) that there is no durable subscriber for the receiving program. That’s why the messages don’t get buffered.

My question is: How can I create a durable subscriber associated with an asynchronous JMS consumer so that messages don’t get lost even if they are published when the receiving program is down?

If I use the native UM API, I can explicitly create a durable subscription and the problem does not arise. But I’d like to use the more well known JMS API (which is also supported by Spring) if possible.

Thank you!

The answer is simple. One just has to mark the JmsListener (e.g. in the @JmsListener annotation) as durable.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.