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 Java / JMS » Messages retrived from transmission Queue.

Post new topic  Reply to topic
 Messages retrived from transmission Queue. « View previous topic :: View next topic » 
Author Message
Ramesh_ka
PostPosted: Mon Dec 29, 2003 1:40 pm    Post subject: Messages retrived from transmission Queue. Reply with quote

Novice

Joined: 24 Dec 2003
Posts: 13

Hi,

I kept a text message into Remote Definotion using JMS API. While i am trying to retirve the text message it saying ClassCast Exception.

I am thinking that i kept the text message and while i am retriving i am typecasting to javax.jms.TextMessage.

can we retrive messages from TransmissionQueue. if so, can any thorogh some light on this how to cast the message comming from TransmissionQueue using JMS API.

I am trying hard can any one help me soon..

Regards
Ramesh
Back to top
View user's profile Send private message Send e-mail
leongor
PostPosted: Tue Dec 30, 2003 1:00 am    Post subject: Reply with quote

Master

Joined: 13 May 2002
Posts: 264
Location: Israel

What the goal you want to reach ?
Usually you can't get message from xmitQ because it's open with exclusive option by a channel.
_________________
Regards.
Leonid.

IBM Certified MQSeries Specialist.
Back to top
View user's profile Send private message
Ramesh_ka
PostPosted: Tue Dec 30, 2003 8:09 am    Post subject: Reply with quote

Novice

Joined: 24 Dec 2003
Posts: 13

Hi,

My main goal is. If i have 10 messages in the TransmissionQueue Which is triggered for depth 10. But i want to trigger on depth and time. Since time is not possible in MQ.

Before tiggering i want my java program to browse the transmissionQueue and calliculate the date. if the requirements match then i want to take the message from the queue before triggering and place it into another queue.

for this reason i want to read the messages from Transmission Queue.

Today while i made some trials i can receive mesage but the message is BYtesMesage. Can you help me how to convert the received byt message to a String message or Text message using java or jms API.

Thank u very much for your inputs and thanks in advance.


Regards
Ramesh
Back to top
View user's profile Send private message Send e-mail
Michael Dag
PostPosted: Tue Dec 30, 2003 9:22 am    Post subject: Reply with quote

Jedi Knight

Joined: 13 Jun 2002
Posts: 2607
Location: The Netherlands (Amsterdam)

I still not completely get what you are trying to do.

Is the channel supposed to start when 10 messages are on it AND a certain time is expired OR a certain time is expired? Is there a dial-up connection involved?

Michael
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
EddieA
PostPosted: Tue Dec 30, 2003 9:43 am    Post subject: Reply with quote

Jedi

Joined: 28 Jun 2001
Posts: 2453
Location: Los Angeles

The problem with the message 'data types' is probably because the message, when read from the XMITQ, has the XMIT header as the first part of the message payload, followed by the actual message.

Instead of trying to manipulate the XMITQ, can you get the application to write to a Local Queue. Run your 'smoke and mirrors' on THAT queue, and when your're happy, put them to the correct Remote Queue.

Cheers,
_________________
Eddie Atherton
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Tue Dec 30, 2003 9:44 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Have you looked at the documentation about Transmission queues?

Were you aware that messages on a Transmission queue have a special type of header (that is not an MQMD header)?
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
tkane
PostPosted: Wed Dec 31, 2003 8:39 am    Post subject: Reply with quote

Voyager

Joined: 23 Dec 2002
Posts: 82
Location: Kansas City

Ramesh,
I'm more wondering about the design here than the how to get the message off the queue in JMS.

From my point of view MQ is a messaging and queueing system.

Applications put messages to queues and get messages from queues.

Systems (infrastructure) include channels and xmitqs pass those messages for the applications.

I work in a very large environment and in most cases the xmitqs serve multiple applciations. The only things that I want reading the xmitqs are the channels and myself as the MQ Admin when somebody is having a problem and we resort to the old method of browsing the messages on the queues to figure out what's wrong.

I think good design splits the two areas. Applications should worry about putting messages and getting messages. There are several features (expiry, COA, COD, report messages in the MQ API that can help you do this). I don't know if they are in the JMS API, I'm just starting to look at Java and JMS after 7 years of COBOL and C.

Tom
Certified a long time ago - does anybody remember when there was only 1 IBM MQ cert?
Back to top
View user's profile Send private message
prasannal
PostPosted: Sun Jan 11, 2004 1:13 am    Post subject: Reading Transmission Queue Reply with quote

Apprentice

Joined: 04 Aug 2003
Posts: 44

Hi,
I am reading about Remote Queues.

So, Is there a way through which I can read messages lying in XMITQ and GET them destructively?

Also I had one doubt Can I use same transmission Queue for messages going to different Remote Queues?

Thanks.
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Sun Jan 11, 2004 8:11 am    Post subject: Re: Reading Transmission Queue Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

prasannal wrote:
So, Is there a way through which I can read messages lying in XMITQ and GET them destructively?
Yes. If the channel is stopped. You shouldn't need to and you shouldn't want to, though - at least in the course of normal business.

Quote:
Also I had one doubt Can I use same transmission Queue for messages going to different Remote Queues?


Yes. It is typical to have one XMIT queue per sender channel.

You should really read the Intercommunications Guide, if you're asking questions like these. It will save you and us time.
_________________
I am *not* the model of the modern major general.
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 Java / JMS » Messages retrived from transmission Queue.
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.