aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes consuming messages from JMS Queue without other group having to do anything Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "consuming messages from JMS Queue without other group having to do anything" Watch "consuming messages from JMS Queue without other group having to do anything" New topic
Author

consuming messages from JMS Queue without other group having to do anything

John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
Hi

I am new user to Java ranch. First of i want to thank all of the great people who provide solutions for people in need. Thanks for all the good deeds.

Here is my problem that i am stuck with.

I am java developer and my lead gave me this problem and asked me to come up with a solution and implement that.

The problem is: We are interfacing with another group and we exchange messages using webservices. Suppose the other group name is xxx. When xxx sends messages using webservices, we use JMS queue on our side and wrote MDBs to consume the messages. Now what my lead wants me to do is, when our system sends messages to xxx, we need to implement a message queue so that message passing is asynchronous. He wan't everything done on my side and not on xxx side. I was thinking, that i can implement a queue and the messages from webservices will be stored in a queue and if the xxx group writes a MDB, they can access the queue. But my lead says, they don't have to do anything. we have to do everything on our side and they should be able to consume messages as they used to do with webservices. he wants to find out a solution for this and implement that. Can anybody please let me know if they have any solution for this. Actually i am new to JMS, but i think i can implement that if i just know the solution. One of my friends said, untill xxx group has some kind of JMS listener, they can't consume the messages and so this is not possible. Can anybody help me get a solution for this

PS: i forgot to tell that we are using JBoss as our server.

Thanks in advance
Barbie
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Hi Barbie,

Your requirement is not clear to me. What is the other application (xxx in your example) going to do if you are sending the message to the queue and your application is listening to the same messages?

If the other application has to consume a message from your queue then they need to listen to your queue. If the other application exposes a webservice which you can call then you can call it directly from your app.


Amit Tank
Linked In
John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
HI Amit

Thanks for taking time and answering my question. Yes you are correct. Without the xxx application not having any kind of JMS listeners it's not possible for them to consume messages from the queue. Thats what i told my lead. But he says, without the xxx application having to do a single thing, they should be able to consume messages. So we have to find a solution on our end. Here it is what is happening now. We have a webservice exposed to them and they call it directly right now. But my lead is worried about scenarios like if that application's server is down for some reason then our messages might be lost. So he says we need to place msgs in a queue and send them to them until, we are sure they got the messages. So my lead asked me to find a solution for this. Means how to accomplish this and also implement that.

So again my question is, is there any way that we can perform asynchronous messaging without the xxx application having to do nothing and only we do everything on our side. Is it even possible? If so How?

Thanks a lot in advance Amit and everybody else who is looking at this post and trying to help me.

Barbie
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

"Barbie",
Please check your private messages regarding an important administrative matter.
-Ben


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
Sorry i am new to forums and didn't know forum rules. My Name is swapna and i will not use my display name Barbie anymore.

Thanks for letting me know
Swapna
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Originally posted by swapna:
Sorry i am new to forums and didn't know forum rules. My Name is swapna and i will not use my display name Barbie anymore.

Thanks for letting me know
Swapna


Thanks for changing your display name swapna, unfortunately its not wuite right yet. The naming rules require both a first and a last name. Can you please update this again?

Thanks!


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
Originally posted by Paul Sturrock:


Thanks for changing your display name swapna, unfortunately its not wuite right yet. The naming rules require both a first and a last name. Can you please update this again?

Thanks!


Sure. I changed it like you suggested. Sorry for the mistake again.
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
What you can do here is, have a durable Queue say "A" with infinite redelivery, post all your messages to the queue "A", listen to the queue "A" via an MDB etc, in your MDB call the webservice of the xxx application. If the xxx application is down rollback the transaction so that the message is sent back to the Queue.

I am not sure if the above is a correct approach. As the same message will again be send to the MDB and it will fail continuosly unless the xxx app is up and running.
John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
Thanks Amit

I got the same thought today. I will let you know after i discuss this with my lead and if wants me to implement this.
Thanks a lot once again.

Swapna
John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
Hi Amit

Can you please let me know how a durable queue can be created in JBoss
I tried searching on net but no luck. Can you please help me here

Regards
Swapna
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
Hi Swapna,

Post your query in the products/JBoss forum. I have never worked in JBoss and don't have any idea about it.

Thanks,
John Steve
Greenhorn

Joined: Jun 10, 2008
Posts: 7
Thanks Amit
I will do that

Swapna
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: consuming messages from JMS Queue without other group having to do anything