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 » General Discussion » any

Post new topic  Reply to topic
 any « View previous topic :: View next topic » 
Author Message
Goodfellas
PostPosted: Mon Feb 22, 2010 3:29 pm    Post subject: any Reply with quote

Acolyte

Joined: 26 Feb 2009
Posts: 70

Hello,

Last edited by Goodfellas on Tue May 28, 2013 12:03 pm; edited 2 times in total
Back to top
View user's profile Send private message
PeterPotkay
PostPosted: Mon Feb 22, 2010 3:34 pm    Post subject: Reply with quote

Poobah

Joined: 15 May 2001
Posts: 7722

Look at the source code, which comes with the MQ product if you install the Samples. There are good comment blocks throughout the code.

Of course you can tweak the sample and recompile so it does what you want.

There are a number of support packs that have a lot more options and flexability.
_________________
Peter Potkay
Keep Calm and MQ On
Back to top
View user's profile Send private message
bruce2359
PostPosted: Mon Feb 22, 2010 4:19 pm    Post subject: Reply with quote

Poobah

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

Quote:
We all know that when we do 5 or 6 different puts to a queue....and later when we do get....we get all the 6 puts at time..

No you don't. Each MQPUT delivers one message to a queue; each MQGET call retrieves one message from a queue.
_________________
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
mvic
PostPosted: Mon Feb 22, 2010 5:08 pm    Post subject: Re: amqsget---any parameters Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

Goodfellas wrote:
Are there any options/parametsers along with amqsget where we can pull the message from the queue 1 by 1.

Something which can be developed at the Shell script level not at the Programming level.

amqsget only exists to demonstrate a few details of how to use MQ's C API.

If used unaltered, it is not a good basis for a production application. Firstly, it gets messages outside syncpoint. This is a generally unsound way of getting messages. If your messages are at all important, you should get them inside syncpoint.

Secondly, it does not deal with messages larger than 64 Kb. Thirdly, it always attempts to convert the messages it receives. These can be valid specifications, but not in every situation.

If possible, please tell us some details of what you are trying to develop, what languages your team has experience in (NB. programming in shell probably doesn't give enough flexibility, but we'll see) and the relevant requirements. No sensitive details please.
Back to top
View user's profile Send private message
Goodfellas
PostPosted: Mon Feb 22, 2010 9:18 pm    Post subject: Reply with quote

Acolyte

Joined: 26 Feb 2009
Posts: 70

The

Last edited by Goodfellas on Sun May 26, 2013 3:32 pm; edited 1 time in total
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Feb 22, 2010 9:24 pm    Post subject: Reply with quote

Grand High Poobah

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

Goodfellas wrote:
So I want to know by using amqsget can we pull specified number of messages from queue. For Example there are 10 msgs in a queue and I jst want to pull 5 messages using amqsget.


As my worthy associates have said, amqsget is only a sample. You can change the code to do whatever you want.

As they have also said, you might find some of the support pacs more suited to your needs.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 22, 2010 9:37 pm    Post subject: Reply with quote

Grand High Poobah

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

Talking about support packs ... If MQExplorer does not satisfy your needs have a look at MO71. It is an excellent support pack and allows for a lot of flexibility.

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
mvic
PostPosted: Tue Feb 23, 2010 12:51 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

Goodfellas wrote:
The App team want the messages to be pulled 1 by 1 from the queue. And they want MQ admins to do that....

In my very humble opinion, the app team should write their own code running in their own process to do something that is required by their application suite.

If you are comfortable with developing part of the application suite, (or perhaps operating it manually from a GUI like MO71 or MQ Explorer), that's fine. But as soon as you are signed up for that, you have to support it 24x7.

(What times of the day does the application need specific messages to be removed from queues?)

I may have misunderstood, YMMV, etc. etc. Hope this helps.
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 23, 2010 6:58 am    Post subject: Reply with quote

Poobah

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

Quote:
The App team want the messages to be pulled 1 by 1 from the queue. And they want MQ admins to do that....

WMQ offers a robust set of Application Programming Interfaces (APIs) to process messages. Programmers write applications in one or more of the supported programming languages.

Quote:
So I want to know by using amqsget can we pull specified number of messages from queue. For Example there are 10 msgs in a queue and I jst want to pull 5 messages using amqsget.

Amqsget is a sample utility program used to demonstrate WMQ functionality. It does not process messages. It merely gets them from a queue, and displays them on STDOUT.

And, as written, amqsget consumes ALL messages in the queue. Source code (in C) is provided. Your application developers can use it as a model for writing business applications.

Your developers need to read the WMQ Application Programming Reference and WMQ Application Programming Guide.
_________________
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
mvic
PostPosted: Tue Feb 23, 2010 7:34 am    Post subject: Reply with quote

Jedi

Joined: 09 Mar 2004
Posts: 2080

bruce2359 wrote:
And, as written, amqsget consumes ALL messages in the queue.

As long as each is less than 64 Kb and convertible. Upon arrival of any that is not both of these, amqsget will either give up, or produce results unlikely to be of much use.

Quote:
Source code (in C) is provided. Your application developers can use it as a model for writing business applications.

Business applications should typically get messages inside syncpoints, which amqsget does not do.

I agree the app team should write the application suite. This seems obvious, though, so I wonder what are the reasons why 'Goodfellas' is under pressure to write this part of the application.


Last edited by mvic on Tue Feb 23, 2010 7:42 am; edited 1 time in total
Back to top
View user's profile Send private message
bruce2359
PostPosted: Tue Feb 23, 2010 7:39 am    Post subject: Reply with quote

Poobah

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

as a follow-on:

amqsput and amqsget (or amqsbcg or amqsbcgc) are paired to demonstrate (validate) that a message can be successfully put to a queue, and then successfully consumed from the queue.

These, and other supplied sample programs, are not business applications - in that they do no business processing.

Is the requirement that some messages need to be purged from the queue AND not processed?
_________________
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
gbaddeley
PostPosted: Tue Feb 23, 2010 5:18 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

mvic wrote:
Goodfellas wrote:
The App team want the messages to be pulled 1 by 1 from the queue. And they want MQ admins to do that....

In my very humble opinion, the app team should write their own code running in their own process to do something that is required by their application suite.


I completely agree. MQ admins should not be dealing with app messages at all. The app team should have all the appropriate programs and tools to move, clear, reprocess, get messages on their queues.
_________________
Glenn
Back to top
View user's profile Send private message
RogerLacroix
PostPosted: Wed Feb 24, 2010 1:13 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

Hi,

It is better to use an existing tool.

You can find a list of free MQ Tools here:
http://www.capitalware.biz/mq_tools.html

And a list of Commercial MQ Tools here:
http://www.capitalware.biz/mq_tools_comm.html


Regards,
Roger Lacroix
Capitalware Inc.
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
bruce2359
PostPosted: Wed Feb 24, 2010 1:22 pm    Post subject: Reply with quote

Poobah

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

Goodfellas: what processing are you supposed to do with the messages in the queue?
_________________
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 Page 1 of 1

MQSeries.net Forum Index » General Discussion » any
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.