Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-595

When restarting a route with inflight jms message, messages appear to be lost

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • 2.7.1-fuse-00-43
    • None
    • None

    Description

      We have the following routes:

              from("jms:queue:in")
                	.routeId(mainRouteId)
                	.transacted()
                	.to("jms:queue:out");
                
            	 from("jms:queue:stop")
            	 	.routeId("SuspendRoute").routePolicy(rcp)
            	 	.log(LoggingLevel.WARN, "Stopping .. " + mainRouteId);
      
            	 from("jms:queue:start")
            	 	.routeId("ResumeRoute").routePolicy(rcp)
            	 	.log(LoggingLevel.WARN, "Restart received " + mainRouteId);
      

      A message to start/stop ends up calling camelContext.stopRoute() and camelContext.startRoute() on the mainRoute.
      When the route is stopped, the DMLC complains with messages as follows. The route is sucessfully restarted but
      it appears the message inflight are lost.

      2012-03-22 16:21:33,044 [JmsConsumer[in]] WARN  JmsMessageListenerContainer    - Rejecting received message because of the listener container having been stopped in the meantime: ActiveMQTextMessage {commandId = 1521, responseRequired = true, messageId = ID:dstanley-mbp.local-63247-1332447677985-0:1:1:1:1514, 
      originalDestination = null, originalTransactionId = null, producerId = ID:dstanley-mbp.local-63247-1332447677985-0:1:1:1, destination = queue://in, transactionId = null, 
      expiration = 0, timestamp = 1332447693026, arrival = 0, brokerInTime = 1332447693026, brokerOutTime = 1332447693027, correlationId = null, replyTo = null, persistent = 
      true, type = null, priority = 4, groupID = null, groupSequence = 0, targetConsumerId = null, compressed = false, userID = null, content = null, marshalledProperties = null, 
      dataStructure = null, redeliveryCounter = 0, size = 0, properties = null, readOnlyProperties = true, readOnlyBody = true, droppable = false, text = <activemq>Test message
       1513 now=1332447693026</activemq>}
      
      

      I tried plugging in jms transactions and the behaviour is much better, but I still see one or two messages are lost.

      Regards
      /Dave

      Attachments

        1. 100000.png
          114 kB
          Claus Ibsen
        2. 4000-out.png
          105 kB
          Claus Ibsen
        3. testcase.tar.gz
          32 kB
          Dave Stanley

        Activity

          People

            willem.jiang Willem Jiang (Inactive)
            davestanley Dave Stanley (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: