Win a copy of GANs in ActionE this week in the AI forum
or WebAssembly in Action in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Need to stop getting the messages from the Message driven Bean

 
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am facing the following issue.

I have a Message driven bean, which accepts messages of type TextMessage. However, just for testing, i wrote some Client which posts the msg in the queue being listened to by the MDB, and i posted MapMessage from that client.
Now, it fails with a class cast exception but the problem is that the messages just keep on coming, one after the other, after a certain interval of time, and exceptions keep getting thrown on the console, probably because the subscription is durable.
Basically, i want to get rid of the exceptions by making the subscription as non-durable(if it can be made).
Where does the Server store that it needs to post this message in the queue again and again, so that probably i can remove the setting from there.
Or is there any other way i can stop getting the msg in the MDB.
Also, i would like to change minimal code, because its part of the application, like i would not like to modify the existing MDB to filter out the messages.

I am using Weblogic 10.

Thanks a lot,
 
author & internet detective
Posts: 39789
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you configure WebLogic to use a dead letter queue after a certain number of retries?
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks,

Can you please explain how exactly to do it.

tried googling, but couldn't find...

 
Jeanne Boyarsky
author & internet detective
Posts: 39789
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul,
I was actually asking. I've used the dead letter queue, but not on WebLogic.

A google search tells me the answer is yes.
 
Rahul Babbar
Ranch Hand
Posts: 210
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I was able to get rid of it using from the weblogic management console.
Services->Messaging->JMS Modules -> <Queue>

Initially i tried to change the redelivery limit to some reasonable value of 10 instead of -1.
but it did not seem to work, because the redelivery had already been made more than 10 times, perhaps.

So, it changed the "Delivery Mode Override" of the queue to be non persistent instead of persistent.

and it works...

Thanks...

 
Ever since I found this suit I've felt strange new needs. And a tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!