webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

UniversalMessaging: How to create a durable subscriber for JMS?

  • 1.  UniversalMessaging: How to create a durable subscriber for JMS?

    Posted Fri December 30, 2022 03:40 AM

    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!


    #Universal-Messaging-Broker
    #webMethods


  • 2.  RE: UniversalMessaging: How to create a durable subscriber for JMS?

    Posted Wed January 04, 2023 02:04 PM

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


    #webMethods
    #Universal-Messaging-Broker