|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Multiple connections from different threads in Linux |
« View previous topic :: View next topic » |
Author |
Message
|
manu |
Posted: Thu Nov 03, 2005 12:16 am Post subject: Multiple connections from different threads in Linux |
|
|
Newbie
Joined: 02 Nov 2005 Posts: 3
|
Hi.
I'm developping an app that needs to read from a queue and, if there are any messages, launch a thread to read that message. (That thread will begin a conversation with the other end)
I'm having problems because when I open the queue in another thread, with a new connection handle, I get the 2042 error (which I can't find in the docs).
This is the Makefile line that compiles the app.
g++ $(OBJECTS_PMQ) -o pmq -Wl,-export-dynamic -W,-rpath/opt/mqm/lib/3.3 -L/home/manuel/lib -L/opt/mqm/lib/3.3 -lpthread -limqb23gl_r -limqc23gl_r -lutils
I put the libs as noted in the docs with _r suffix for threads. I'm using g++ (GCC) 3.4.4 20050314 (prerelease) (Debian 3.4.3-13), so I put most recent version number for the libs (3.3).
It also happens sometimes that my app launch two threads because it reads the same message twice before the first launched thread gets the opportunity to read that message. Is there any MQ option to hadle this? I know some other solutions, but I would like to know if MQ has some way to handle this.
Thank you. |
|
Back to top |
|
 |
wschutz |
Posted: Thu Nov 03, 2005 2:33 am Post subject: |
|
|
 Jedi Knight
Joined: 02 Jun 2005 Posts: 3316 Location: IBM (retired)
|
Quote: |
I get the 2042 error (which I can't find in the docs). |
You can use mqrc to get a short description of any error code:
Code: |
wschutz@wschutz ~]$ mqrc 2042
2042 0x000007fa MQRC_OBJECT_IN_USE |
And you should be able to find 2042 in the MQ Messages & Codes manual:
http://publib.boulder.ibm.com/infocenter/wmqv6/v6r0/index.jsp _________________ -wayne |
|
Back to top |
|
 |
manu |
Posted: Thu Nov 03, 2005 3:38 am Post subject: |
|
|
Newbie
Joined: 02 Nov 2005 Posts: 3
|
Thank you for the hints.
I'll search documentation about the BROWSE_NEXT thing.
And about the mqrc command, I have the linux client, but no server software and I can't find that command. |
|
Back to top |
|
 |
kevinf2349 |
Posted: Thu Nov 03, 2005 6:11 am Post subject: |
|
|
 Grand Master
Joined: 28 Feb 2003 Posts: 1311 Location: USA
|
Quote: |
I get the 2042 error (which I can't find in the docs).
|
Presumably you have the "Messages" manual (in which this is clearly documented)? If you don't have it in paper form there is always the link on this site. |
|
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
|
|
|
|