Neuron ESB User Network

The Service Bus for the Connected Business

Basically, I want to do content based routing.  I would like to publish messages to a single topic.  I would like a pipeline event handler on that topic publisher to inspect the messages published then route it to another topic as appropriate.  I think it could be as simple as a pipeline with a SetProperty step that moves the value of a Custom Property into the Topic property, but I’m not sure if that will do the trick.  I'm using datagram and an MSMQ transport.  Also, I'm not exactly sure which topic, pub and sub queues need to exist if I implement a pipeline router.  Could you please provide some guidance, documentation and/or examples?

Tags: MSMQ, Pipeline, Router, Topic

Views: 226

Reply to This

Replies to This Discussion

You can use either an existing Condition or an ad hoc condition in the subscriptions to create content based routing. This is accessible through the Subscription builder dialog box that you launch from the Publisher/Subscriber UI in the Neuron ESB Explorer.  Either you can do Xpath against the body…or you can type in a custom property in the conditions form.

 

For example. If the source message XML is and you wanted to inspect the Body of the message for routing:

 

<book isbn="0836217462">

  <title>Being a Dog Is a Full-Time Job</title>

  <author>Charles M. Schulz</author>

  <character>

    <name>Snoopy</name>

    <friend-of>Peppermint Patty</friend-of>

    <since>1950-10-04</since>

    <qualification>extroverted beagle</qualification>

  </character>

  <character>

    <name>Peppermint Patty</name>

    <since>1966-08-22</since>

    <qualification>bold, brash and tomboyish</qualification>

  </character>

</book>

 

A content-based condition would be similar to:

                Field        Predicate                               Value

                Body        Matches XPath                      /book/character/name[contains(text(), "Snoopy")]

 

The above XML would pass the condition.

 

Alternatively, if you wanted to route the message based on a custom property that you previously set in a process:

 

A custom property based condition would be similar to:

                Field                                        Predicate               Value

               Prefix.PropertyName                   Any Predicate         Any Value

 

For custom properties you just have to manually type in the prefix and name of the property in the drop down field

Do I just set context.Data.Header.Topic = to the value I get from Prefix.PropertyName?  Is that sufficient to get the message routed to a different topic?

Okay, here's where I'm at.  I'm using a client connector to get messages onto the bus.  I'm adding two custom soap headers to the service call.  One header contains the topic name, and the other header contains the subtopic name.  It looks like these headers are added to the custom properties collection inside the ESB message.  What is the best way to set the topic to the topic and subtopic values contained in the headers/custom properties?  This is starting to get urgent.

RSS

Neuron ESB Product Support Forums and Communities

Latest Activity

Anupama Nair posted a discussion

Marketo Adapter Invalid Token

Hi,We are using the Marketo adapter to push account updates to Marketo. It works well for some time then starts failing with Invalid Token unless restarted. Is there a configuration that can be done so it can auto refresh the token when required?Thanks!See More
Nov 6, 2023
Sayantini Basak posted a discussion

Maximum payload size(REST API) for requests interfacing to NeuronESB

I am new to Neuron ESB and in our current scenario,We need to process batch transactions comprising of ~1000 records and send them to Neuron ESB for further processing. I would like to understand what is the maximum size of payload that can be transferred using REST interface to Neuron ESB.See More
Jul 22, 2022
Profile IconRobert E Dunie and Sayantini Basak joined Neuron ESB User Network
Apr 28, 2022
Profile IconDayanand, Frederic C, Steffen Greve-Oksfeldt and 1 more joined Neuron ESB User Network
Mar 16, 2022
Profile IconCam Vong and Mitja Luznar joined Neuron ESB User Network
Jan 27, 2022
Profile IconWill Hitzges, Chad Parsons, michael larsen and 4 more joined Neuron ESB User Network
Jun 11, 2021
Anupama Nair posted a discussion

ODBC stored proc polling with temporary tables

We have set up an ODBC adapter to poll a stored proc.We found that if the stored proc has a temporary table defined the rows returned are always 0.Any idea why this would be and what we can do to get around it?See More
Dec 14, 2020
Prasanth Kharade is now a member of Neuron ESB User Network
Dec 30, 2019

Badge

Loading…

© 2024   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service