Programatically query Neuron for subscribers/publishers and topics - Neuron ESB User Network2024-03-28T21:40:46Zhttp://forum.neuronesb.com/forum/topics/programatically-query-neuron?feed=yes&xn_auth=noThis should be able to give y…tag:forum.neuronesb.com,2010-02-24:2748813:Comment:20052010-02-24T20:54:53.000ZFrostyhttp://forum.neuronesb.com/profile/Frosty
This should be able to give you a start:<br />
<br />
#########Powershell 2.0###############<br />
# variables<br />
$NeuronDll = "D:\Program Files\Neudesic\Neuron ESB\Neuron.Esb.dll"<br />
$NeuronConfig = "D:\Program Files\Neudesic\Neuron ESB\BrinksEDA25.esb"<br />
<br />
Write-Host "Variable NeuronConfig = $NeuronConfig"<br />
<br />
# source utility functions<br />
[Reflection.Assembly]::LoadFrom($NeuronDll) | out-null<br />
<br />
$meta = New-Object -TypeName Neuron.Esb.Internal.ESBMetabase $NeuronConfig<br />
$subscribers = $meta.Configuration.Subscribers.Values |…
This should be able to give you a start:<br />
<br />
#########Powershell 2.0###############<br />
# variables<br />
$NeuronDll = "D:\Program Files\Neudesic\Neuron ESB\Neuron.Esb.dll"<br />
$NeuronConfig = "D:\Program Files\Neudesic\Neuron ESB\BrinksEDA25.esb"<br />
<br />
Write-Host "Variable NeuronConfig = $NeuronConfig"<br />
<br />
# source utility functions<br />
[Reflection.Assembly]::LoadFrom($NeuronDll) | out-null<br />
<br />
$meta = New-Object -TypeName Neuron.Esb.Internal.ESBMetabase $NeuronConfig<br />
$subscribers = $meta.Configuration.Subscribers.Values | where {$_.PublisherRole -eq $true} | sort SubscriberId<br />
<br />
foreach($sub in $subscribers)<br />
{<br />
$sub<br />
}<br />
<br />
Write-Host "Finished"<br />
#########Powershell 2.0############### Most.... illuminating ;)
Tha…tag:forum.neuronesb.com,2009-11-10:2748813:Comment:17112009-11-10T19:57:53.000ZRichard Lowehttp://forum.neuronesb.com/profile/RichardLowe
Most.... illuminating ;)<br />
<br />
Thanks.
Most.... illuminating ;)<br />
<br />
Thanks. Don't tell anyone I showed yo…tag:forum.neuronesb.com,2009-11-10:2748813:Comment:17102009-11-10T18:39:45.000ZCMhttp://forum.neuronesb.com/profile/CM
Don't tell anyone I showed you this ...but here's some code from the test client...<br />
<br />
SubscriberConfiguration config = new SubscriberConfiguration("Administrator", null, null, null);<br />
<br />
Administrator admin = new Administrator(config.ServiceAddress, config.ServiceIdentity);<br />
admin.OpenConfiguration();<br />
<br />
List topicsList = new List();<br />
<br />
String zone = null;<br />
if (_client != null) zone = _client.Context.Zone.Name;<br />
else zone = ConfigurationManager.AppSettings["esbZone"];<br />
<br />
List topics =…
Don't tell anyone I showed you this ...but here's some code from the test client...<br />
<br />
SubscriberConfiguration config = new SubscriberConfiguration("Administrator", null, null, null);<br />
<br />
Administrator admin = new Administrator(config.ServiceAddress, config.ServiceIdentity);<br />
admin.OpenConfiguration();<br />
<br />
List topicsList = new List();<br />
<br />
String zone = null;<br />
if (_client != null) zone = _client.Context.Zone.Name;<br />
else zone = ConfigurationManager.AppSettings["esbZone"];<br />
<br />
List topics = admin.GetAllTopics(zone);<br />
foreach (ESBTopic topic in topics)<br />
{<br />
topicsList.Add(topic.Name);<br />
<br />
if (topic.Hierarchy != null)<br />
{<br />
foreach (Subtopic subtopic in topic.Hierarchy)<br />
{<br />
topicsList.Add(subtopic.Name);<br />
}<br />
}<br />
} Ok, thanks for that... but af…tag:forum.neuronesb.com,2009-11-10:2748813:Comment:17082009-11-10T16:42:59.000ZRichard Lowehttp://forum.neuronesb.com/profile/RichardLowe
Ok, thanks for that... but after poking around a bit it's not entirely clear how to connect without already knowing a party ID.<br />
<br />
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?<br />
<br />
What do you think is the best option?
Ok, thanks for that... but after poking around a bit it's not entirely clear how to connect without already knowing a party ID.<br />
<br />
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?<br />
<br />
What do you think is the best option? The TestClient uses the Admin…tag:forum.neuronesb.com,2009-11-04:2748813:Comment:17062009-11-04T17:16:57.000ZCMhttp://forum.neuronesb.com/profile/CM
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.
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.