Andy Zhong

Greenhorn
+ Follow
since Nov 03, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Andy Zhong

I tried the solution you posted. But it seems the message is still be consumed after setRollBackOnly. Any idea?

The code is specified below: Both system print messages are displayed on the prompt.
boolean isStop=true;
try{
if(isStop){
System.out.println("The Message will send back to the queue for redelivering");
context.setRollbackOnly();
}
String msgFileName = (StreamMessage)message.readString();
System.out.println("Get sourceFile:"+msgFileName );