Neuron ESB User Network

The Service Bus for the Connected Business

One of the very new cool features in Neuron ESB is the ability for users to create their own custom pipeline steps, and have those steps show up in the right hand Pipeline Step pane within the Neuron ESB Pipeline Designer. This provides a great way for developers to create reusable code assets for other developers to use with any project.

 

Previously, if a developer wanted to create new capabilities using Visual Studio and reuse those capabilities within Neuron, it required creating a library assembly and referencing that assembly within a Code Pipeline Step.  If there were N number of Code Pipeline Steps, the assembly would have to be re referenced in each one. Obviously, if the assembly changed, all Code Pipeline Steps would have to be changed as well.

Custom Pipeline Steps allow developers to create reusable capability that doesn’t require re referencing custom assemblies within Code Pipeline Steps. Furthermore, new capabilities can be parameterized and driven by publicly exposed properties using the Neuron property grid (lower right hand corner of the designer), controlling exactly how developers interact with the new capability both at design time and runtime.

Using Custom Pipeline Steps is a three step process, Create, Deploy and Register:

  • Create the Custom Pipeline Step
  • Deploy the Custom Pipeline Step into the Neuron Pipeline sub directory
  • Register the Custom Pipeline Step within the neuronpipelines.config configuration file

Creating a Custom Pipeline Step

Creating a Custom Pipeline Step requires creating a Visual Studio .NET C# Class project.  This will have at least 1 class that implements the Neuron.Esb.Pipelines.CustomPipelineStep base class. This base class has one method to override, OnExecute().

This class can optionally contain public properties that are exposed using the Microsoft Property Grid within the Neuron ESB Pipeline Designer. The class attributes, DisplayName and Description are used to control what name and description are displayed within the Neuron ESB Pipeline Designer.

Additionally, a graphic (PNG 16x16) can be included in the project. This graphic is used as the icon that represents the Custom Pipeline Step within the Neuron ESB Pipeline Designer window. The file name of the graphic must exactly follow that of the namespace and class name of the Custom Pipeline Step class. 

For example, if the namespace of the Custom Pipeline Step is “Neuron.Pipelines.CustomSamples” and the class name is “MyCustomPipelineStep”, then the image file included in the Visual Studio .NET C# Class library must be named, “Neuron.Pipelines.CustomSamples.MyCustomPipelineStep.png

Once the Custom Pipeline Step is compiled, it is ready to deploy.

A sample of a Custom Pipeline Step can be found in the Samples\Features\Pipelines\Neuron.Pipelines.CustomSamples directory located at the root of the Neuron ESB installation directory

NOTE: Custom Pipeline Steps can optionally be signed with a strong named key (snk) if they need to be copied to the Global Assembly Cache (GAC).

Deploying a Custom Pipeline Step

Deploying a Custom Pipeline Step involves copying the previously created assembly that contains it, to the Pipelines directory located at the root of the Neuron ESB installation directory.

If using the Neuron ESB Client API on a remote machine that is NOT running the Neuron ESB Service (hosted by a custom application), than that assembly should either be deployed to the local GAC, or in the Bin directory of the hosting application.

Registering a Custom Pipeline Step

Once a Custom Pipeline Step is deployed, it must be registered in the neuronpipelines.config file within the Pipelines directory located at the root of the Neuron ESB installation directory:

  <neuron.pipelines>

    <stepTypes>

    </stepTypes>

  </neuron.pipelines>

Registration requires inserting the assembly reference by using the “Add” element as follows:

  <neuron.pipelines>

    <stepTypes>

      /i>add name="MyCustomPipelineStep" value="Neuron.Pipelines.CustomSamples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ecaf0c45d7be0e34"/>

    </stepTypes>

  </neuron.pipelines>

Once the registration is complete, the Neuron ESB Service must be restarted if using Service Endpoints or Adapter Endpoints that will be using the Custom Pipeline Step.

If using the Neuron ESB Client API on a remote machine that is NOT running the Neuron ESB Service (hosted by a custom application), than the new Pipeline Step’s registration information needs to be added within the App.Config file of the hosting application as follows:

<configuration>

 

  <configSections>

    <section name="neuron.pipelines" type="Neuron.Configuration.PipelinesConfigurationSection, Neuron"/>

  </configSections>

 

  <neuron.pipelines>

    <stepTypes>

      <add name="MyCustomPipelineStep" value="Neuron.Pipelines.CustomSamples, Version=1.0.0.0, Culture=neutral, PublicKeyToken=ecaf0c45d7be0e34"/>

    </stepTypes>

  </neuron.pipelines>

 

</configuration>

Views: 127

Reply to This

Neuron ESB Product Support Forums and Communities

Latest Activity

Nick Novotny posted a discussion

Script to stop/restart service connectors

Is there a way to turn on and off service connectors through the neuron api?  Right now I need to go to Endpoint Health in Activity, and right click to stop and restart service connectors, I would like to have a script to do this.  Is this possible? Thanks,-Nick NSee More
May 11
Profile Iconsuresh datla and Mahboob joined Neuron ESB User Network
Apr 24
Nick Novotny posted a discussion

Msmq network transport error logging

We have multi-casting one way messaging through a remote msmq server using wcf services for our system. One day one of our many environments got a message to multicast…and didn’t send anything out.  We have a pipeline step to audit the incoming message, topic properties to move msmq messages to a dead letter queue after a specific amount of time, and a service policy to move messages to the failed neuron db table after a specific amount of time/retries (matching the msmq network properties to…See More
Apr 13
Stas Makutin posted a discussion

Load-balancing using Neuron

I want to implement following scenario using Neuron ESB:- get big list of working items from somewhere (let's say some database)- split this list to small "batches" of working items- send these batches each to particular instance of specific subscriber (Worker), so each that instance will process assigned batch in parallel with other instances- collect feedback (is processing complete/failed) + implement some fail-over mechanism (resend failed batches, monitor if batches weren't processed…See More
Apr 11
Profile IconStas Makutin, Bjorn Thomsen and Steve Harclerode joined Neuron ESB User Network
Apr 11
MH is now a member of Neuron ESB User Network
Mar 29
Profile IconCraig Muir and mehnaz joined Neuron ESB User Network
Mar 12
John Ryan posted a discussion

Trouble creating a net.msmq Client Connector

Has anyone successfully created a Client Connector using Net.msmq?I'm trying as many different configurations as i can to post a message to a Client Connector but i get the following error on my client app:"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state."It looks as though my client connector endpoint is not binding to the WAS correctly.If anyone has any ideas, i'd love to hear them.Here are my Client…See More
Mar 6

Badge

Loading…

© 2012   Created by Neuron Admin.   Powered by

Badges  |  Report an Issue  |  Terms of Service