camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ben1729 <>
Subject Splitting within transactions
Date Tue, 18 Sep 2012 17:08:52 GMT
I have the following route running in ServiceMix (v4.4.2) using Camel v2.8.5:

	.process(new Processor() {
			public void process(Exchange exchange) throws Exception {
				List<IGPSUser> users = new ArrayList<IGPSUser>();
				users.add(new GPSUser("id1", "rfyId1", "name1"));
				users.add(new GPSUser("id2", "rfyId2", "name2"));
				users.add(new GPSUser("id3", "rfyId3", "name3"));


				System.out.println("Completed getting users");
		 // Simulated crash of ServiceMix
		.process(new Processor() {
			public void process(Exchange exchange) throws Exception {
				if (((GPSUser) exchange.getIn().getBody()).getId().equals("id3")) {                  
					// Breakpoint here while I kill ServiceMix using TaskManager

Messages are then pulled from the users queue for further processing. I am
using a transaction hoping that either all the split messages will get to
the users queue or none of them will (and the message will be rolled back to
the start queue). However, I am seeing that the first two messages get
through and rgwb ServiceMix shuts down. When I restart it (and don't kill at
the breakpoint) all the messages are delivered (including the first two that
got through the first time). What am I doing wrong?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message