documents count in JMS topic

Hello,

I have done some sort of POC on JMS in which wM broker is a JMS provider. I have configured JMS related details as part of IS admin, created a topic as part of MWS in wM8.0 version. I created a pubslisher, JMS trigger and Subscribing service which is able to receive data from the sender.

I want to get the below one.

I want to store the documetns as part of Topic when my JMS trigger is in disable state,also where can I see documents count which are been stored as part of JMS topic.

Thank you

Can someone please help me on this.

Thanks,
RP

Hi R P,

You have to setup a durable subscriber on your subscription trigger if you want to have your published documents durable while the trigger is disabled or IS is down.

Open JMS Trigger in designer and you will see an option to give a durable subscriber name. Give a name and you are done. I have attached the screenshot for your reference
durable.PNG

Thanks Prasad.

Do I need to specify only in the JMS trigger or do I need to configure anywhere else. Also, can we give any name to it ?. After doing the changes, I disabled trigger, publisher send a few docs, where can I see these docs ?

Thanks,
RP

Creating from JMS trigger is fine. You need not configure it anywhere else again. But if you are interested in other ways of creating it, then there are two ways you can it:

  1. From JMS trigger as I mentioned in previous post
  2. From MWS. Login as Administrator, then navigate to Administration -> Messaging -> Broker Servers -> Clients. Click on “Add Durable Subscription”, fill in the details and click OK. You have to still come to JMS Trigger and provide the name of durable subscriber you just created and save it.
  • YES, you can give any name you want but giving a meaningful name which clearly conveys that it is durable subscriber will make more sense.

  • To view the documents that are being stored when trigger is disabled, Login to MWS as Administrator, then navigate to Administration -> Messaging -> Broker Servers -> Clients. Search for the durable subscriber you created by using “Keywords” control from Broker Client Search Bar.

Thanks Taqiuddin for your inputs.

If I have multiple subscribers for the same doc, do we need to specify multiple Durable Subscriptions each corresponds to one or can we have the same ?

Can you please shed some light on this ?

Thanks for your time and help.

Thanks,
RP

You have to use multiple durable subscribers each corresponding to one subscription trigger.

Basically, durable subscriber acts like to QUEUE in front of subscription trigger. So, whenever trigger is disabled or not able to consume messages for some reason, all the docs gets queued up in the configured durable subscriber as if they gets stored in a queue. Whenever, trigger is UP and ready to consume, all the queued up docs from durable subscription will be consumed by trigger.

So, having said this, If you have same durable subscriber configured on all the different JMS triggers, then only one of them will get the message and other will not as the doc has gone out of durable subscriber already and got consumed by different subscription trigger (Same as many triggers connected to same QUEUE). So, in order to make sure every subscription trigger stores a copy of doc for itself, there should be a dedicated durable subscriber for each of them.

Let’s say, you have 2 subscribers, 2 JMS triggers associated with it using the same Durable subscriber name. If both the triggers are in enabled state, publisher sending the msg then only one trigger take over, calls the corresponding service, the call may go with some algorith usage. It means that, 1st msg go to Trigger1 -> subscriber1, 2nd msg go to Trigger2-> Subscriber2,…

If one trigger is in enable state, other is in disable state, in this case only the trigger which is in enabled gets the msg and finishes teh flow. The trigger which is in disbaled state doesn’t have any action.

If both the triggers are in disabled state. Docs which are been published stay in the DuableSubrscirer Q which is been shared b/w 2 triggers. Which ever tigger enabled first, take over the control process the message.

Please go through and let me know for any doubts on the same. Better give a try if you have time.

Thanks,

Thanks both for your reply.

Thanks,
RP

Hello All,
While creating JMS Queue there is an option “Shared State” check box in MWS, can you please share me the importance of it ( like by checking and un-checking the option ), also do we have the same as part of JMS Topic ? If yes, where can I find the same option.

I have gone through JMS BIS guide, I am not so clear, so trying to implement the concept and reaching you guys for help.

I really thankful to you all.

Thanks,
RP

Shared State option is not applicable for JMS Topic. It is applicable on QUEUES and DURABLE SUBSCRIPTIONS.

Usecase:

When more than one JMS trigger is associated with a same QUEUE or DURABLE SUBSCRIPTION, all of them will compete to consume the document from the queue while only one of them can get it. During this time, other resources fail complain and log an error saying something like “Could not consume the message from queue as it might have already been consumed by some another resource”. This is because, there is no understanding between the triggers that they are sharing the same QUEUE.

To make this understanding, you have to check the option “Share State”. The moment we do this, all triggers know that they are sharing the state of this queue with others and they will stop competing for messages. As MR as173d mentioned in his previous post, messaging system uses algorithm like round robin to distribute the messages between triggers.

Hum, got it, thanks Prasad for your help.

Thanks,
RP