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 » Max Message Size for clustered queues

Post new topic  Reply to topic
 Max Message Size for clustered queues « View previous topic :: View next topic » 
Author Message
svu
PostPosted: Mon Jan 30, 2006 7:35 am    Post subject: Max Message Size for clustered queues Reply with quote

Voyager

Joined: 30 Jan 2006
Posts: 99

I am trying to use standard Java API methods (MQQueue.getMaxMessageSize and MQQueue.inquire) to get the maximum message size for the queue. If the queue is local, non-shareable - it works like a breeze. But if I share the queue - I get the MQRC_SELECTOR_NOT_FOR_TYPE warning (and -1 as result). Is there any way to obtain the queue size for clustered queues using Java API? How is standard MQ Explorer GUI doing it?
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Jan 30, 2006 9:37 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Use the MQ_SET option along with the MQ_INQ option when opening the queue.

Also, I don't think an app should be doing this anyway. You have a message to send, send it. If its to big, the put will fail with a very specific error code saying its to big. Waste of time I think always asking how big a messsage could be. The q shouldn't determine this for you, your business requirements should (and the q built acordingly).
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Jan 30, 2006 9:49 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

I agree with Peter, what will you do if the maxmsgl on the queue is smaller than the message you need to put?

However, I do have a question about your post...when you say "If I share the queue", what exactly do you mean? Do you mean "make the queue a cluster queue" or do you mean setting the SHARED attribute on the queue?

EDIT: I just saw the topic name, so I take it you mean "putting the queue into a cluster". So, then the question becomes: do you leave it as a local queue to your java application or do you remove it locally? I'd bet that you remove it locally, which is why you can't query the maxmsgl.
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
svu
PostPosted: Mon Jan 30, 2006 10:06 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2006
Posts: 99

PeterPotkay wrote:
Use the MQ_SET option along with the MQ_INQ option when opening the queue.

Ghm it works. But it looks a bit strange to me - why would I enable "set" access to the parameters if I only need "get"?

Quote:
Also, I don't think an app should be doing this anyway. You have a message to send, send it. If its to big, the put will fail with a very specific error code saying its to big. Waste of time I think always asking how big a messsage could be. The q shouldn't determine this for you, your business requirements should (and the q built acordingly).

In general, I agree - I am just trying to detect the problems at early stages of the processing, before actual submitting. But may be you are right - probably I should better look at MQExceptions...

Thanks for your help.
Back to top
View user's profile Send private message
svu
PostPosted: Mon Jan 30, 2006 10:08 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2006
Posts: 99

wschutz wrote:
I agree with Peter, what will you do if the maxmsgl on the queue is smaller than the message you need to put?

I just wanted to save some time by not submitting it;)

Quote:
EDIT: I just saw the topic name, so I take it you mean "putting the queue into a cluster". So, then the question becomes: do you leave it as a local queue to your java application or do you remove it locally? I'd bet that you remove it locally, which is why you can't query the maxmsgl.

The queue remains local to the application, as far as I can see.
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Jan 30, 2006 10:10 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

svu wrote:
wschutz wrote:
I agree with Peter, what will you do if the maxmsgl on the queue is smaller than the message you need to put?

I just wanted to save some time by not submitting it;)

So you save time on the very rare occasion that the message is to big, and waste time the majority of the time checking a value you really don't have to.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Jan 30, 2006 10:11 am    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

svu wrote:
PeterPotkay wrote:
Use the MQ_SET option along with the MQ_INQ option when opening the queue.

Ghm it works. But it looks a bit strange to me - why would I enable "set" access to the parameters if I only need "get"?

Yeah, I think this is annoying and weird too. I have to give +set authority for apps that only need to do inquiry. But thats the way IBM made it for clustered queues.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
wschutz
PostPosted: Mon Jan 30, 2006 10:11 am    Post subject: Reply with quote

Jedi Knight

Joined: 02 Jun 2005
Posts: 3316
Location: IBM (retired)

Quote:
The queue remains local to the application, as far as I can see.
so you're saying you believe it remains local and simply added to the cluster. Why arent' you "sure" of this, is someone else doing the admin work?
_________________
-wayne
Back to top
View user's profile Send private message Send e-mail AIM Address
svu
PostPosted: Mon Jan 30, 2006 10:14 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2006
Posts: 99

PeterPotkay wrote:

So you save time on the very rare occasion that the message is to big, and waste time the majority of the time checking a value you really don't have to.

Well, probably my assumptions about "what's expensive and what is cheap" are not exactly accurate:)
Back to top
View user's profile Send private message
svu
PostPosted: Mon Jan 30, 2006 10:16 am    Post subject: Reply with quote

Voyager

Joined: 30 Jan 2006
Posts: 99

wschutz wrote:
so you're saying you believe it remains local and simply added to the cluster. Why arent' you "sure" of this, is someone else doing the admin work?


I am doing the admin work for a moment. The queue remains local and simply added to the cluster. At least as far as MQ Explorer is concerned.
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 » Max Message Size for clustered queues
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.