0 Replies Latest reply on Aug 1, 2013 5:56 AM by cheng tang

    Divert has a bug?

    cheng tang Newbie

      I configure a divert in hornetq-configuration.xml. One of the lines is  "<exclusive>true</exclusive>".

       

      I send a large message and I see two files,one of them is received and the other is replicated.

       

      the replicated file is referenced by a ServerMessage,but the received message is not.

       

      is this A bug? the received message should be deleted?

       

      Please have a look at BindingsImpl.route.

       

      public void route(final ServerMessage message, final RoutingContext context) throws Exception

         {

            boolean routed = false;

       

       

            if (!exclusiveBindings.isEmpty())

            {

               for (Binding binding : exclusiveBindings)

               {

                  if (binding.getFilter() == null || binding.getFilter().match(message))

                  {

                     binding.getBindable().route(message, context);

       

       

                     routed = true;

                  }

               }

            }

      //should add codes like

      if(routed && message.isLargeMessage())

      {

      //delete the file of large message

      }