ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » Multiple connections from different threads in Linux

Post new topic  Reply to topic
 Multiple connections from different threads in Linux « View previous topic :: View next topic » 
Author Message
manu
PostPosted: Thu Nov 03, 2005 12:16 am    Post subject: Multiple connections from different threads in Linux Reply with quote

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
View user's profile Send private message Send e-mail
wschutz
PostPosted: Thu Nov 03, 2005 2:33 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address
manu
PostPosted: Thu Nov 03, 2005 3:38 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
kevinf2349
PostPosted: Thu Nov 03, 2005 6:11 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ API Support » Multiple connections from different threads in Linux
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.