|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Alternative way of putting message to a remote q |
« View previous topic :: View next topic » |
Author |
Message
|
techno |
Posted: Wed Feb 11, 2004 11:51 am Post subject: Alternative way of putting message to a remote q |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
I see this in WebSphere MQ Admin:
Code: |
Using a local definition of a remote queue is not the only way of putting messages
on a remote queue. Applications can specify the full queue name, including the
remote queue manager name, as part of the MQOPEN call. In this case, you do
not need a local definition of a remote queue. However, this means that
applications must either know, or have access to, the name of the remote queue
manager at run time.
|
Is it somwhat equivalent to Cleint Connection in JMS? Please throw some light.
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Wed Feb 11, 2004 12:58 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
No. You can do this in Bindings Mode. All you are doing is making MQ put the message directly to the XMIT Q without a Remote Q definition.
In order to do this, MQ has to be able to resolve which XMIT Q to use based on the Queue Manager name.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
techno |
Posted: Wed Feb 11, 2004 4:23 pm Post subject: |
|
|
Chevalier
Joined: 22 Jan 2003 Posts: 429
|
Typical code looks like
Code: |
qConnectionFactory = new MQQueueConnectionFactory();
((MQQueueConnectionFactory) qConnectionFactory).setQueueManager(sqManager);
qConnection = qConnectionFactory.createQueueConnection();
qSession = qConnection.createQueueSession(transacted, Session.AUTO_ACKNOWLEDGE);
qQueueSender = qSession.createQueue("qname");
qSender = qSession.createSender(qQueueSender);
Message msg = ...
qSender.sendMessage(msg); |
Could you guide me how to do that? I don't see the place where I can give another qmgr name...
Thanks |
|
Back to top |
|
 |
EddieA |
Posted: Wed Feb 11, 2004 5:44 pm Post subject: |
|
|
 Jedi
Joined: 28 Jun 2001 Posts: 2453 Location: Los Angeles
|
Quote: |
qQueueSender = qSession.createQueue("qname"); |
Go look in the Java manual about URIs.
Cheers, _________________ Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|