New to Neuron ESB, so forgive me if this is easy.
I have been going through tutorials, and experimenting with conditional routing. I have figured out how to set up subscriptions with routing for one of the various message header properties that are in the dropdown (Action, Body, Schema, etc).
I was trying to figure out if it is possible to do this same kind of conditional routing based off of a custom property in the message?
For example, the following code would generate a message for the Contacts.New Topic.
ESBMessage msg = new ESBMessage ("Contacts.New",customer);
msg.SetProperty("MT", "MessageType", "AutomatedCustomer");
publisher.SendMessage(msg);
I want my Subscriber setup to receive for this topic where CustomProperty("MessageType") == "AutomatedCustomer"
or something like that...
Tags:
David,
You can do this. When you configure the subscriptions for the subscriber, click on the topic that you want to add the condition to and click the button next to the Create a Condition text box:
On the Edit Conditions dialog, just enter the name of the custom property you want to route on:
Click OK and this subscriber will only receive messages on the Topic1 topic that have the customer property MT.MessageType = AutomatedCustomer.
Thanks Joe,
I had tried this, but evidently I had something else misconfigured when I did so...thereby making it appear to not work. It works perfectly though.
David
Neuron ESB Product Support Forums and Communities
© 2024 Created by Neuron Admin. Powered by