Queues Vs Topics

With queue Type: I Have created 1 JMS Publish service and 2 subscribe service’s subscribing to same queue

JMS Publish service one msg to JMS Queue_Common

Queue_Common >> JMS Subscribe_Trigger1 >> Invokes JMS Subscribe_Service1
Queue_Common >> JMS Subscribe_Trigger2 >> Invokes JMS Subscribe_Service2

I see 2 subscribe services don’t subscribe to same msg at same time from same queue.
If Subscribe_Service1 invokes, subscribe_Service2 won’t invoke and vice versa.

==========================================================================================================
With Topic Type: I Have created 1 JMS Publish service and 2 subscribe service’s subscribing to same Topic

JMS Publish service one msg to JMS Topic_Common

Topic_Common >> JMS Subscribe_Trigger1 >> Invokes JMS Subscribe_Service1
Topic_Common >> JMS Subscribe_Trigger2 >> Invokes JMS Subscribe_Service2

I see 2 subscribe services don’t subscribe to same msg at same time from same topic.
If Subscribe_Service1 invokes, subscribe_Service2 won’t invoke and vice versa.

Is this an expected behavior or is something wrong? Ideally, I guess both the target triggers must subscribe?

1 Like

Looks like all working as expected.

There is one queue or durable subscriber, so there is only one message. Then, two triggers pointing to same queue or durable subscriber, so only one will pick up the message and process it.

In case you want multiple copies of the message, and each copy processed by different triggers, then you can do that with Topic.
In case of topic, you can have multiple durable subscribers. Each subscriber will get one copy of message. Both the topic trigger will be invoked. In IS topic trigger definition, use different Durable Subscriber name and same Topic name. That should work for you.

Best Regards,
Sandeep

when Iam trying to create a new trigger with same topic and different durable subscriber name. IS is throwing error " topic already exists on same JMS connection alais"

if I try using different “JMS connection alais” error msg : “JMS event : {topicName} already exists.”

I am not sure what could be wrong. I could setup two separate durable subscribers for same topic. I used Broker for my setup. UM JNDI/Topic will be slightly different. IS will work same way in either case.

I listed out my steps in case it helps.

Setup JNDI lookups as follows:
/ > show conn_factory
conn_factory : com.webmethods.jms.impl.WmXAConnectionFactoryImpl
BrokerHost: localhost:10549
BrokerName: Broker #1
Application: JMS
ClientGroup: IS-JMS
ClientId: MyClient
SSLKeystore:
SSLTruststore:
SSLKeystoreType: PKCS12
SSLTruststoreType: JKS
SSLEncrypted: true
UseXA: true
MarshalInClassName:
MarshalOutClassName:
/ > show MyTopic
MyTopic : com.webmethods.jms.impl.WmTopicImpl
TopicName: MyTopic
EventType: MyTopic
SharedState: true
PriorityOrdering: true
LocalOnly: false
DeadLetterOnly: false
SharedStateOrdering: None

Create Topic on Broker:

IS JNDI Provider setup:
image

IS JNDI lookup:

IS connectin alias
image

IS trigger1

IS trigger2

Broker clients page shows one connection, and two durable subscribers

1 Like

Last screenshot shows disconnect client because I did not configure pub/sub permissions for the document type in broker.
Once done, both trigger will be enabled and subscribers should show connected.

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