24

I am intercepting messages that are sent through JBossESB. I am using pipeline interceptors to do so.

The problem is, that altough the sender is a service (for example PortReference < logical:BlueServiceESB#BlueListener >), the name of the receiver is a queue (not a service). That is logical because in some case, multiple services can receive messages from a given queue, but usually, each queue is mapped to only one service.

I would like to know which queue is mapped to which service, so I can display/save this information and have it displayed like message: service ---> service (not service ---> queue).

I know that I can get the name of the queue mapped to a service using the registry like this:

System.setProperty("javax.xml.registry.ConnectionFactoryClass", "org.apache.ws.scout.registry.ConnectionFactoryImpl");

// Retrieving information from the ESB Registry
Registry reg = RegistryFactory.getRegistry();
System.out.println(reg.findAllServices());
List<EPR> eprs = reg.findEPRs("FirstServiceESB", "SimpleListener");
System.out.println(eprs);

I would like to reverse this approach - queue is the input and service (EPR = end point reference = service) is the output. Is there any way how to do this or am I just trying to do the impossible here. I have found no tutorials or questions on this topic whatsoever.

Thanks for any tips!

Smajl
  • 7,555
  • 29
  • 108
  • 179
  • I'm not familiar with the JBoss ESB EPR data structure, but would querying for all of the queues and building a reverse-lookup map be an option for you? – Alex Aug 07 '13 at 08:18
  • Unfortunately there is no such function that would allow searching for services using queue names :-( – Smajl Aug 29 '13 at 08:02

2 Answers2

1

As this question has 25 up-votes, this seems to be an useful feature. JBossESB is open source software. Thus, implement the feature yourself and commit it to the community! Or just create a change request hopping that somebody else will do it...

Peter Keller
  • 7,526
  • 2
  • 26
  • 29
0

Try querying for all of the queues and building a reverse-lookup map. But I don't think there is any function that allows searching for services using a queue.