1

I need to send messages to different Queue Managers (different QM name, host-port pairs).

What is the best way to handle this scenario? Do I need to create separate ConnectionFactory for each Queue Manager?

Use Case: Java service which is sending command message to distributed agents (FTE agents). However those agents can listen on different queues on different Queue Managers.

smolarek999
  • 509
  • 1
  • 5
  • 21

3 Answers3

0

Yes you need to use different ConnectionFactory for each JMS server. You can reuse ConnectionFactory only for various Queues on one Message Broker.

luboskrnac
  • 23,973
  • 10
  • 81
  • 92
  • Do you know if creating many ConnectionFactory has big performance implications? Those will be used only for producing messages. – smolarek999 Sep 02 '15 at 10:49
  • I know, that is why you shouldn't create them on runtime. You didn't disclose if your queues can be introduced on runtime, but it would be unusual requirement. – luboskrnac Sep 02 '15 at 11:24
0

I think you are better of connecting the different queue managers hosting the queues and accessing the remote queues via remote queue definitions created on the queue manager your JMS application is connecting to.

I guess these queue managers are already connected, if you are moving files between the FTE agents.

Attila Repasi
  • 1,803
  • 10
  • 11
0

FTE has the concept of the Command Queue Manager. This node is designated as the one QMgr to which the application should connect when communicating with the FTE agents. If the network has been properly defined, connectivity between all FTE agents and the Command QMgr will be present.

The design is one of the ways in which FTE can enforce security. It is possible on the agent QMgrs for the channel from the command queue manager to be authorized very specifically to a subset of the queues and the messages monitored. The design provides a policy enforcement point. Since the FTE security model is weak to begin with, it is important to try to properly use the security controls that are provided.

This design also means that it is not necessary to manage application service account credentials across all the agent QMgrs.

So, yes, use the Command QMgr for its intended purpose. Have one and only one connection factory and properly design and secure the FTE network using the Command QMgr and its channels as a policy enforcement point.

T.Rob
  • 31,522
  • 9
  • 59
  • 103