Neuron ESB User Network

The Service Bus for the Connected Business

How can I send a message to a Neuron Topic from the Client API, with Custom Properties already populated when it publishes?

The only send methods I find, send either a string, XML, or the ESBMessage.Body (string).  None of these methods appear to be setup to allow me to pass in the actual ESBMessage...and specfically header information with custom properties.

Thoughts?

Views: 352

Reply to This

Replies to This Discussion

I think I found the answer in the DefaultCustomProperties collection for passing in Custom Properties from the API...is there a way to the Neuron Properties?

Say for examlpe I want to pass in on my message the Header.SessionId.  I can call 

message.Header.Session = "myCustomValue"

However, I cannot find a Send() method capable of sending in the message...only the message Body get sent in...

Session is an internal property Neuron uses....you should not be using it.  To set custom properties in the code...just use the SetProperty() off of the esb message object.  I think we ship samples of doing this in the Neuron Fundamentals training doc

here's an abstract:

ESBMessage msg = new ESBMessage(TOPIC, "hi mom");
msg.SetProperty("emerson", "po", "98ijk");
publisher.SendMessage(msg);

ugh...i hate asking stupid questions.  Did not see the SendMessage() method when looking for different send options.

Thanks for the quick reply

no worries...there's a whole sample project we ship with the training tutorial...shows a bunch of different ways to send messages...how to connect and inspect connection errors...and how to cast things back into their appropriate data types...

http://support.neuronesb.com/downloads/NeuronFundamentals.zip

Dave..

One thing to help you along, look at esb message class within the C# code activity in a business process or a workflow. It's the exact same API you will use in the client code. 

Another approach to consider, in order to make your code less complex is to attache a business process to your publisher. In there, assuming the necessary data is available in the message text, you can set and hydrate the properties. 

JP

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