# How execute all of services in jms triggers routing rules?

**URL:** <https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995>\
**Category:** Forum\
**Tags:** jms, QUEUE\
**Created:** [October 12, 2021, 6:16pm UTC](https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995 "2021-10-12T18:16:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jesus\_Carrillo1](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jesus\_Carrillo1](https://techcommunity.softwareag.com/u/Jesus_Carrillo1)\
**Post date:** [October 12, 2021, 6:16pm UTC](https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995/1 "2021-10-12T18:16:43Z")

</div>

#### What product/components do you use and which version/fix level?

IS 10.5

I have my packages like this:  
Package1 (package)  
|-\>Package1 (folder)  
|-\>|-\>srv(folder)  
|-\>|-\>|-\>myserviceP1 (flow service)  
|-\>|-\>trigger(folder)  
|-\>|-\>|-\>mytriggerP1 (trigger)  
Package2 (package)  
|-\>Package2 (folder)  
|-\>|-\>srv(folder)  
|-\>|-\>|-\>myserviceP2 (flow service)  
|-\>|-\>trigger(folder)  
|-\>|-\>|-\>mytriggerP2 (trigger)

both of triggers are configurated like:  
JMS connection alias name: DEFAULT\_IS\_JMS\_CONNECTION  
JMS trigger type: Standard  
JMS destinations and message selector:  
-Destination Name: mydestination  
-DestinationType: QUEUE

BUT mytriggerP1 has a Rule1 to Package1.srv:myserviceP1  
AND mytriggerP2 has a Rule1 to Package2.srv:myserviceP2

So, when 100 messages are published at same time in UM on “mydestination” destination name, myserviceP1 execute 50 times and myserviceP2 execute 50 times. Fifty-fifty.

I want both of services consumes the 100 messages and not 50-50. How can I do that?

If I try to add a new rule in a trigger and save (for example myserviceP2 in a new Rule2 on mytriggerP1), show the following error: [ISS.0134.9207] Routing Rule “Package1.srv:myserviceP1” is unreachable. Do you want yo disable the trigger and continue saving?"

---

<div class="post-metadata">

**Author:** ![John\_Carter4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/john_carter4/32/19818_2.png) [@John\_Carter4](https://techcommunity.softwareag.com/u/John_Carter4)\
**Post date:** [October 12, 2021, 6:46pm UTC](https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995/2 "2021-10-12T18:46:56Z")

</div>

You cannot distribute documents held in a queue this way. A queue is designed for 1:1 relationship where only one subscriber can connect at a time. I’m not even sure how you are able to do the split at all as you should only be able to activate one trigger at a time.

You need to use a topic instead of a queue.

You can then have as many subscribing triggers as you wish and each one will receive a copy of the same document  
regards,  
John.

---

<div class="post-metadata">

**Author:** ![Jesus\_Carrillo1](https://avatars.discourse-cdn.com/v4/letter/j/ac91a4/32.png) [@Jesus\_Carrillo1](https://techcommunity.softwareag.com/u/Jesus_Carrillo1)\
**Post date:** [October 12, 2021, 7:02pm UTC](https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995/3 "2021-10-12T19:02:42Z")

</div>

> [@John\_Carter4](#):
>
> topic instead of a queue.

Thank you so much for your soon reply. I get it, so now how can I change the destination type of a existing destination? Or should I delete it and recreate it?

Thank you

---

<div class="post-metadata">

**Author:** ![John\_Carter4](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/john_carter4/32/19818_2.png) [@John\_Carter4](https://techcommunity.softwareag.com/u/John_Carter4)\
**Post date:** [October 12, 2021, 7:27pm UTC](https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995/4 "2021-10-12T19:27:37Z")

</div>

If you are in a dev environment, there’s no risk in just recreating it i.e. delete the queue and then create a new topic directly. If I remember rightly you can create the topic directly from within the JMS trigger.  
regards,  
John.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [January 10, 2022, 7:27pm UTC](https://techcommunity.softwareag.com/t/how-execute-all-of-services-in-jms-triggers-routing-rules/244995/5 "2022-01-10T19:27:57Z")

</div>

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