Andy Zhong

Greenhorn
+ Follow
since Nov 03, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

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 );