What product/components do you use and which version/fix level?
UM 10.5
Are you using a free trial or a product with a customer license?
Customer License
What are trying to achieve? Please describe in detail.
I have a java client connect to my um local realm (127.0.0.1:9000), inside it I have a channel named pgreplicationd(is a topic).
When I connect my client to local realm server the connection appears in Realm > Monitoring > Connections
My Java Client send information using pgreplicationd topic succesfully. In IS I have a JMS trigger that get this information an then execute a flow service to log the message.
Do you have any subscribers added to specific topic? If yes, They should be visible from the Topic-> Connections view.
Please check the doc link: Viewing Channel Connections (softwareag.com)
Im sorry but how can I add a subscriber to my topic? Client sent information to my topic sucessfully right now, but “suscription” is about the client who send information or the IS flow service who receive it?
The client who send information to the topic will be publishing the data i.e. Publisher and the one who receive it by subscribing to the topic will be the subscriber for the topic. So, In this case as you mentioned the IS flow service who is receiving it will be the subscriber.
Hi, @Anil_Kumar_Pamisetty
Ok, Topic > Connections view is for suscriptors.
Realm > Connections view is for publishers.
So, is there a way to know only publishers of a specific topic?
Right now I use API Admin java for retrieve all connetions (Java Service in IS):
> String[] RNAME={"nsp://127.0.0.1:9000"};
> String traza = "";
> nSessionAttributes nsa;
> nsa = new nSessionAttributes(RNAME);
> nRealmNode realm = new nRealmNode(nsa);
> Thread.sleep(realm.getUpdateInterval());
> nNode topic = realm.findNode("pgreplicationd");
> MonitorListener ml = _instance.new MonitorListener(); //_instance is a obj from flow service. MonitorListener is a internal class
> realm.addConnectionListener(ml); //I've add a connection listener to realm to get all connections (Realm > Connection view in Enterprise Manager)
//This is my internal class
class MonitorListener implements nConnectionListener{
@Override
public void add(nConnectionDetails cd) {
// TODO Auto-generated method stub
for(String e : cd.getSubject()) {
JournalLogger.log(4,90,4,"Log","new Connection: "+e);
}
}
@Override
public void del(nConnectionDetails cd) {
// TODO Auto-generated method stub
for(String e : cd.getSubject()) {
JournalLogger.log(4,90,4,"Log:","Desconection: "+e);
}
}
}
This code retrieve all connections from realm but how could I know which of them are connections to my topic?
Ive tried add listener to my topic but not work.
And, is there a way for retrieve thats connections without listener? My idea is execute the java service when I need to know the publisher connections to my topic and save that data to database. I understand that listener are done for continuous executions, like a permanently running program but this is the given way from Software AG Documentation.
So, how can I get a nConnectionDetails object from realm o topic without listener?