Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Message getting sent mulitple times  RSS feed

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

Using Weblogic and JMS to send messages, my problem is when a sender it sending out a email and have multiple cc's (around 1000), messages are being sent out synchronously, there is a possibility that the request processing takes so long that Weblogic is retrying the request on another node. Due to this the messages are being sent 2+ times..
I am not sure how to change the design? Should I make it asynchronous?? How do I go about this?
 
Reid M. Pinchback
Ranch Hand
Posts: 775
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It sounds like your transactions are timing out. That will cause the message ack to fail, and hence the message is supposed to be redelivered because a failed ack means you haven't processed it yet.

If I'm correct about the transaction time-out, one solution is to find some way of dividing up the work into smaller pieces before sending the message. If that isn't an option (e.g. you have a customer who sends you the messages and you can't choose to change the format), you can receive the message data, divide into pieces, persist the pieces, and send JMS messages to another bean to process the smaller hunks into email.
[ February 13, 2006: Message edited by: Reid M. Pinchback ]
 
Gayatri Sinha
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot, yes, when the message is being sent it is timing out as the the recievers are many.
I will try breaking into small chunks and sending the message.

Thanks
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!