Author |
Message
|
Ashok Kumar |
Posted: Wed Aug 13, 2014 7:03 am Post subject: Problem of Placing Message in Queue |
|
|
Acolyte
Joined: 01 Jul 2013 Posts: 53
|
Hi WMB Developers,
I am successfully propagated message to Queue using Java compute node but i am unable to see message in queue.
Thanks in advance. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 13, 2014 7:13 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Great!
So now you have a bug in your code somewhere.
Time to start debugging it! |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 7:13 am Post subject: Re: Problem of Placing Message in Queue |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ashok Kumar wrote: |
I am successfully propagated message to Queue using Java compute node but i am unable to see message in queue. |
It's unsupported to write messages to queue with anything other than the MQOutput node, doesn't work that well (as you've found), will at best screw up the broker's transaction control (which I think is where you message is) & will at worst bring the execution group or broker down. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Ashok Kumar |
Posted: Wed Aug 13, 2014 7:17 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2013 Posts: 53
|
Thanks for Replies.
But I didnt get any errors while placing the message in queue. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 7:20 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ashok Kumar wrote: |
I didnt get any errors while placing the message in queue. |
And? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Ashok Kumar |
Posted: Wed Aug 13, 2014 7:21 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2013 Posts: 53
|
What can i do for viewing the message in queue |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Aug 13, 2014 7:26 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
Show your work.
Take a user trace of the whole flow.
Use a trace node.
Take simple, basic steps to debug your code.
And, of course, throw out your whole design if you are using MQ APIs to read or write from queues from inside a JavaCompute node.
You WILL cause *MAJOR* problems if you do this. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 7:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ashok Kumar wrote: |
What can i do for viewing the message in queue |
What makes you think the message actually made it to the queue?
My guess is your message made it, but because you sent it from a JCN and not from the WMB resources it's not committed. And I don't think you can fix that in your code. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 7:31 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
mqjeff wrote: |
And, of course, throw out your whole design if you are using MQ APIs to read or write from queues from inside a JavaCompute node.
You WILL cause *MAJOR* problems if you do this. |
My assumption (from the original post) is that he's using either those APIs or JMS to put the message.
And that's why there's no sign of it. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Wed Aug 13, 2014 7:50 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Do NOT use a JCN to do anything in Java that can be done directly in WMB which of course includes all access to queues, databases, files etc.
If you use JAR files in WMB flows then generally you have done something wrong. Use the IBM provided features.
Also do not use JMS nodes when MQ nodes will do the job. I have seen people using JMS nodes to put and get MQ messages in WMB and it is just pointless and more complex to configure.
Get some training in basic WMB - putting to a queue is lesson one, day one. Don't code Java whenever possible. _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
Ashok Kumar |
Posted: Wed Aug 13, 2014 7:55 am Post subject: |
|
|
Acolyte
Joined: 01 Jul 2013 Posts: 53
|
I am creating sample xml message using java compute node but not using any API or JMS |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 7:58 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ashok Kumar wrote: |
I am creating sample xml message using java compute node but not using any API or JMS |
So now you need to be very, very clear on what your flow is doing as both of us are now unclear on what you're doing. If you're creating an XML message with a JCN and putting it to the queue with an MQOutput node then:
mqjeff wrote: |
So now you have a bug in your code somewhere.
Time to start debugging it!
|
So this advice is highly relevant:
mqjeff wrote: |
Show your work.
Take a user trace of the whole flow.
Use a trace node.
Take simple, basic steps to debug your code.
|
_________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 7:59 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
Ashok Kumar wrote: |
I am creating sample xml message using java compute node but not using any API or JMS |
Of course if you're not using any API, JMS or MQOutput node I've found why the message isn't on the queue. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
zpat |
Posted: Wed Aug 13, 2014 8:11 am Post subject: |
|
|
 Jedi Council
Joined: 19 May 2001 Posts: 5866 Location: UK
|
Or the queue is being read from instantly!  _________________ Well, I don't think there is any question about it. It can only be attributable to human error. This sort of thing has cropped up before, and it has always been due to human error. |
|
Back to top |
|
 |
Vitor |
Posted: Wed Aug 13, 2014 8:22 am Post subject: |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
zpat wrote: |
Or the queue is being read from instantly!  |
It's a possibility....  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
|