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 Installation/Configuration Support » Unable to delete messages on remote queue on windows

Post new topic  Reply to topic Goto page Previous  1, 2
 Unable to delete messages on remote queue on windows « View previous topic :: View next topic » 
Author Message
fjb_saper
PostPosted: Wed Nov 19, 2008 4:54 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

mqjeff wrote:
You can not establish both a bindings connection and a client connection from within the same application.

You've proved this yourself, you just didn't understand it.

You need to establish two different CLIENT connections, one to a queue manager that happens to be running on the same machine as your program, and one that happens to be running on some other machine.

Thanks jeff for stating the obvious again. I hope he read your post better than he did mine:
fjb_saper wrote:
There is a known limitation to mq. You cannot be connected in bindings mode to a qmgr and in any other mode to another qmgr at the same time... If you want to be connected to more than one qmgr at a time you have to choose a client connection even though you might be on the same box.

_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mquser01
PostPosted: Wed Nov 19, 2008 9:59 pm    Post subject: Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

Thanks for your input.
I will explain the reason behind my requirement.
We had an application on windows which used MSMQ hence we could avail MSMQ's functionality of purging messages on local queue as well as queue on remote machine.
We have ported the application to linux.We wanted the same functionality to be implemented using IBM MQ.
I hope i have cleared the reason behind my requirement.
Let me know if there is any other functionality with IBM MQ thru which my target of purging the messages from queue on local & remote machine simultaneously can be achieved?
Back to top
View user's profile Send private message
exerk
PostPosted: Wed Nov 19, 2008 11:27 pm    Post subject: Reply with quote

Jedi Council

Joined: 02 Nov 2006
Posts: 6339

mquser01 wrote:
...Let me know if there is any other functionality with IBM MQ thru which my target of purging the messages from queue on local & remote machine simultaneously can be achieved?


Once more, and with feeling...

Three very knowledgeable people on this site have already told you - use client connection to both queue managers. Just because one is 'local' to you does not stop you connecting in non-bindings mode.
_________________
It's puzzling, I don't think I've ever seen anything quite like this before...and it's hard to soar like an eagle when you're surrounded by turkeys.
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Nov 20, 2008 12:38 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mquser01 wrote:
Let me know if there is any other functionality with IBM MQ thru which my target of purging the messages from queue on local & remote machine simultaneously can be achieved?


We keep telling you there is, but you just don't seem to want to hear it.

There's nothing else we can say.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Nov 20, 2008 7:02 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

Rephrased (and edited):

Your executable can be bound (linkedited) with client- or server-bindings.

In server-bindings mode, a local qmgr is one that is executes in the same o/s image as the application. A remote qmgr is a qmgr that the application is not connected to; and it can be either in the same o/s instance (potentially local, but the application did not connect to it), or another o/s instance (always remote).

There are some restrictions on an application connecting to multiple qmgrs.

Additionally, there are some restrictions on an application connecting to both a local qmgr and a remote qmgr (server-bindings vs. client-bindings).

As has been pointed out in this post, if you want a single application to connect to any local or remote qmgr, then you must use client-bindings.
_________________
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
View user's profile Send private message
mquser01
PostPosted: Thu Dec 18, 2008 2:04 am    Post subject: Solution Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

i wanted to use the functionality of mqm.so and mqic.so at the same time from same application. I loaded both the libraries at the same time in my application using dlopen and used it. Now i can put messages on the local queue using mqm.so and inquire the queue on remote machine using mqic.so from same application.
thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 18, 2008 2:10 am    Post subject: Re: Solution Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mquser01 wrote:
I loaded both the libraries at the same time in my application using dlopen and used it.


Interesting. What is this? How do you control which library is in use at any given time and for any given call?

Also, remind me why you need this functionality? Why does your application need to put messages locally and read them remotely? It's a bit anti-pattern.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mquser01
PostPosted: Thu Dec 18, 2008 3:07 am    Post subject: Reply with quote

Acolyte

Joined: 06 Mar 2008
Posts: 52

Quote:
Why does your application need to put messages locally and read them remotely?

Messages inquired on remote machine and messages put on queue on local machine are not the same.
Before starting the application completely we need to check if there any messages pending in queue for which we use MQINQ and get messages count and purge the same.
Our application continues further only after purging these pending messages on remote machine.
Once the application starts completely it puts messages on the local queue.

Quote:
How do you control which library is in use at any given time and for any given call?


the call depends on which library is being referred for the call i.e. eg. MQCONNX behavior changes depending on whether it is being called from libmqm_r.so or libmqic.so
Back to top
View user's profile Send private message
Vitor
PostPosted: Thu Dec 18, 2008 3:22 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

mquser01 wrote:
Before starting the application completely we need to check if there any messages pending in queue for which we use MQINQ and get messages count and purge the same.
Our application continues further only after purging these pending messages on remote machine.
Once the application starts completely it puts messages on the local queue.


Moving a little off topic here perhaps, but your design is this:

An application starts on server A. It checks to see if there are any messages on a queue on server B; if there are it deletes them, then starts putting messages to a queue on server A.

Is this right? What's the connection between these 2 queues that means the same application must use them?
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Thu Dec 18, 2008 3:46 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

mquser01 wrote:
o check if there any messages pending in queue for which we use MQINQ and get messages count and purge the same.


And that's yet another entirely unreliable mechanism you have used.

Using dllopen to open both libraries is going to leave you with an apparently working, but entirely unreliable setup. You will never know at any point if you will have a valid set of library dependancies going on behind your application, nor which specific set of internal libraries will be called behind your MQOPEN or MQGET or etc.

Using dllopen to open both libraries does nothing to make your application more portable, nor more stable. You need to install and run it on a machine that has both MQServer and MQClient installed.

Every design decision you are making is counter to the way normal and well behaved MQ applications work, and there are very good reasons why normal and well behaved MQ applications work the way they do.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Thu Dec 18, 2008 2:13 pm    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9469
Location: US: west coast, almost. Otherwise, enroute.

This falls into the category just because you can do something, doesn't mean that you should.
_________________
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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page Previous  1, 2 Page 2 of 2

MQSeries.net Forum Index » IBM MQ Installation/Configuration Support » Unable to delete messages on remote queue on windows
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.