Neuron ESB User Network

The Service Bus for the Connected Business

Programatically query Neuron for subscribers/publishers and topics

So, how can I query the currently running Neuron configuration for it's subscribers, publishers and for their topics (and whether or not they can pub/sub to those topics)

Is this info available through the API somehow? I would prefer this over getting the infor from the .esb file, if possible.

Tags: Metadata, Publishers, Subscribers, Topcs

Views: 40

Reply to This

Replies to This Discussion

The TestClient uses the Administrator API. I believe you can link to the same dlls. Neuron.Esb.Administration is namespace I think you want to look at.
Ok, thanks for that... but after poking around a bit it's not entirely clear how to connect without already knowing a party ID.

Would I be better off looking directly at the .esb file? Or can you maybe show me a code snippet that shows how to connect to Neuron without a party id, then query for topics and publishers/subscribers?

What do you think is the best option?
Don't tell anyone I showed you this ...but here's some code from the test client...

SubscriberConfiguration config = new SubscriberConfiguration("Administrator", null, null, null);

Administrator admin = new Administrator(config.ServiceAddress, config.ServiceIdentity);
admin.OpenConfiguration();

List topicsList = new List();

String zone = null;
if (_client != null) zone = _client.Context.Zone.Name;
else zone = ConfigurationManager.AppSettings["esbZone"];

List topics = admin.GetAllTopics(zone);
foreach (ESBTopic topic in topics)
{
topicsList.Add(topic.Name);

if (topic.Hierarchy != null)
{
foreach (Subtopic subtopic in topic.Hierarchy)
{
topicsList.Add(subtopic.Name);
}
}
}
Most.... illuminating ;)

Thanks.
This should be able to give you a start:

#########Powershell 2.0###############
# variables
$NeuronDll = "D:\Program Files\Neudesic\Neuron ESB\Neuron.Esb.dll"
$NeuronConfig = "D:\Program Files\Neudesic\Neuron ESB\BrinksEDA25.esb"

Write-Host "Variable NeuronConfig = $NeuronConfig"

# source utility functions
[Reflection.Assembly]::LoadFrom($NeuronDll) | out-null

$meta = New-Object -TypeName Neuron.Esb.Internal.ESBMetabase $NeuronConfig
$subscribers = $meta.Configuration.Subscribers.Values | where {$_.PublisherRole -eq $true} | sort SubscriberId

foreach($sub in $subscribers)
{
$sub
}

Write-Host "Finished"
#########Powershell 2.0###############

RSS

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