one publisher and much subscriber JMS server topic with durable

Hi,
i’m trying to develop a publish/subscribe solution with JMS Server instead of Broker.

this is the scenario:

A web application send a message on topicTest1 (topic with durable)
I would like to let 2 flow services subscribe the message with the possibility to pause a single subscription without losing the message

It is possible implement this solution?
I tried using two JMS triggers but when I suspended one of this, the second one has consumed the message. After that I reactivate the first one but the message has been already consumed

Any suggestion?

Bye
Fabio

Hi Fabio,

did you try a Queue instead of a Topic?

Regards,
Holger

Hi Fabio,

If you want the pure publish-subscribe (broadcast) behavior, then durable should be removed so that all the interested consumers will receive it.

If a particular consumer wants to have these messages durable then it has to be associated with a dedicated durable subscriber just for it.

It is not possible to have just one durable subscriber and want both the consumers which are linked to it to receive the messages

Hi Prasad,
thank you for your solution. It works fine.

The next step is add filters to subscription. I red the manual and it tells that the message selector is available only on header’s fields of JMS Message. I need to filter message on a body’s fields.

How I can implement this feature?

You can make use of “Local Filter” option in the JMS trigger to filter based on body fields. but this filter will happen on Integration Server side not at Messaging layer.

If you want the filter to happen at Messaging layer itself then there is no option but to use “Message Selectors”. For this you have to request the message publisher (source) to populate the required body fields to be filtered on into “JMSMessage/properties”.
filter.PNG

Hi,
thanks a lot. I add a filter correctly.

1 Like