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: 319

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

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