Author |
Message
|
pintrader |
Posted: Thu Jun 19, 2014 7:35 pm Post subject: Creating a listener |
|
|
Disciple
Joined: 22 Jan 2014 Posts: 164
|
hi,
on Unix platform and modern MQ like 7.5, is it still necessary to create Listeners? i check crtmqm but there wasn't option to create Q manager with a port number to listen on. Is there a way to do it?
thanks |
|
Back to top |
|
 |
bruce2359 |
Posted: Thu Jun 19, 2014 8:57 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
If you want to implement certain types of MQ channels, a listener is required. Search for DEFINE LISTENER mqsc command. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
pintrader |
Posted: Fri Jun 20, 2014 12:10 am Post subject: |
|
|
Disciple
Joined: 22 Jan 2014 Posts: 164
|
bruce2359 wrote: |
If you want to implement certain types of MQ channels, a listener is required. Search for DEFINE LISTENER mqsc command. |
hi thanks. what kind of special MQ channels? i only need to have a simple receiver channel. thanks |
|
Back to top |
|
 |
JosephGramig |
Posted: Fri Jun 20, 2014 4:46 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
all inbound channels require a LSTR object be defined and running. |
|
Back to top |
|
 |
pintrader |
Posted: Sat Jun 21, 2014 12:48 am Post subject: |
|
|
Disciple
Joined: 22 Jan 2014 Posts: 164
|
JosephGramig wrote: |
all inbound channels require a LSTR object be defined and running. |
hi, thanks for reply. With reference to this: http://stackoverflow.com/questions/11764466/what-is-the-purpose-of-listener-in-websphere-mq
he said that " Modern queue managers will almost always have listeners defined but it is also possible to specify a default port for the QMgr to listen on without actually defining a listener".
So how do we do it, without actually defining a listener. (Is it through the qm.ini file? )
thanks |
|
Back to top |
|
 |
fjb_saper |
Posted: Sat Jun 21, 2014 2:46 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Argh... incomplete read. Did you also read Vitor's answer on the referenced post?
There is no access to the queue manager from outside the box without a listener.
It can be defined as a listener starting with SYSTEM. and may be filtered out by MQExplorer.
It could be started by inetd but that would date to before V 5.3 and is certainly not the recommended way today...
So drop your pipe dream already and define that listener!.
And remember best practice says to not have the name start with SYSTEM.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tczielke |
Posted: Sat Jun 21, 2014 8:38 am Post subject: |
|
|
Guardian
Joined: 08 Jul 2010 Posts: 941 Location: Illinois, USA
|
Hi pintrader,
This is an assumption on my part, but I believe the crux of your post is you are confused on how to create a listener. We create the listener after the queue manager has been created and started with the following runmqsc definition:
DEFINE LISTENER (1414) +
TRPTYPE (TCP) +
CONTROL (QMGR) +
PORT (1414) +
DESCR ('Auto-start listener') +
REPLACE
The queue manager will then start the listener on each recycle. If you want to start the listener immediately after doing the DEFINE, it is a runmqsc command of:
START LISTENER(1414)
It is up to you what port you want to use, but 1414 is the default. I would recommend that you search and read the MQ manual for LISTENER. |
|
Back to top |
|
 |
pintrader |
Posted: Sat Jun 21, 2014 6:32 pm Post subject: |
|
|
Disciple
Joined: 22 Jan 2014 Posts: 164
|
thanks all for your replies. will create the listener then. I think IBM should just improve create a way to define listener automatically without needing extra steps. |
|
Back to top |
|
 |
bruce2359 |
Posted: Sat Jun 21, 2014 7:23 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
Exactly what kind of listener should be automatically created? WMQ supports several protocols. And which port? What options? What name should it be given ?
Here's a sample script command syntax to define a listener:
Def listener(name) trptype(transport-type) port(port-number) control(qmgr)
What extra steps do you believe are required? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
pintrader |
Posted: Sun Jun 22, 2014 6:32 pm Post subject: |
|
|
Disciple
Joined: 22 Jan 2014 Posts: 164
|
bruce2359 wrote: |
Exactly what kind of listener should be automatically created? WMQ supports several protocols. And which port? What options? What name should it be given ?
Here's a sample script command syntax to define a listener:
Def listener(name) trptype(transport-type) port(port-number) control(qmgr)
What extra steps do you believe are required? |
what i mean is for example, in windows using the MQexplorer, when we create the Q manager the port is automatically 1414 (right click, properties, TCP). I don't have to create a listener as an extra step. thanks |
|
Back to top |
|
 |
bruce2359 |
Posted: Sun Jun 22, 2014 8:03 pm Post subject: |
|
|
 Poobah
Joined: 05 Jan 2008 Posts: 9469 Location: US: west coast, almost. Otherwise, enroute.
|
pintrader wrote: |
bruce2359 wrote: |
Exactly what kind of listener should be automatically created? WMQ supports several protocols. And which port? What options? What name should it be given ?
Here's a sample script command syntax to define a listener:
Def listener(name) trptype(transport-type) port(port-number) control(qmgr)
What extra steps do you believe are required? |
what i mean is for example, in windows using the MQexplorer, when we create the Q manager the port is automatically 1414 (right click, properties, TCP). I don't have to create a listener as an extra step. thanks |
Selecting Listener>New Listener, and picking the other object attributes (or taking the defaults offered), is the equivalent of entering the MQSC script command above.
The up-side (benefit) of using the WMQ Explorer is that you can do one thing at a time. The down-side of using the WMQ Explorer is that you must do one thing at a time.
Seems to me to be easier, and more repeatable, to use script commands - if you will be creating 5, 10, 100, 1000 objects. _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
 |
smdavies99 |
Posted: Sun Jun 22, 2014 10:13 pm Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
The idea of creating a queue manager and everything else totally manually (using the GUI or entering runmqsc commands individually) is frankly as outmoded as the Thermionic Valve.
any decent Admin will have a set of scripts that do it all for them. When done, these are stored in the organisations Source Control System just like code.
Creating a Listener is IMHO on a par with setting the QMGR CCSID and the attributes of the various SYSTEM.DEFAULT queues. This is all part of the basic QMGR Infrastructure. Script it once and away you go.
Wanting a 'crtmqm' to create and start a default listener on port 1414 is IMHO, a really big No-No. for starters we never use 1414 for listeners. 1414 is a well known port so an attack vector could be launched through it.
The Security people would never allow it.(but for some reason the let other depts use MSMQ Doh!).
Get used to scripting your QMGR builds. Once done, you will never look back. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
JosephGramig |
Posted: Mon Jun 23, 2014 7:19 am Post subject: |
|
|
 Grand Master
Joined: 09 Feb 2006 Posts: 1244 Location: Gold Coast of Florida, USA
|
Since you are new to MQ, here is some free advise:
- Never use an IP in the CONNAME. Use fully qualified DSN.
- Always specify the port number in the CONNAME. Don't assume 1414 is the default (somebody will "help" you and change it)
- If there is no DSN, add a name to /etc/hosts for the IP
- Standard channel pairs should be named <FromQmgrName>.<ToQmgrName>
- Cluster receiver channels should be named <ClusterName>.<QmgrName>
- Always define your receiver (inbound) channel first
- If you use MQ clustering, define no less and no more than two FRs
PS: Even in Windows, the listener is not "automagically" created. It is the wizard that created it for you. Learn you love the command prompt like a real programmer. |
|
Back to top |
|
 |
|