4 Replies Latest reply on Oct 7, 2010 5:09 PM by Clebert Suconic

    selector > 4096 bytes invalid

    Mike Charnoky Newbie

      I recently came across a problem with large selectors using HornetQ 2.1.2.  If I specify a selector of > 4096 bytes, an exception is thrown:

      HornetQException[errorCode=103 message=Invalid filter:

       

      Is this intentional or a bug?

       

      Here is a patch for examples/jms/topic/src/org/hornetq/jms/example/TopicExample.java which triggers the problem:

       

      67c67,74
      <          MessageConsumer messageConsumer2 = session.createConsumer(topic);
      ---
      >          String selector = "mypropertyxy IN (";
      >          for (int i=100; i<508; i++) {
      >              if (i>100) selector += ",";
      >              selector += "'val-"+i+"'";
      >          }
      >          selector += ")";
      >          System.out.println("SELECTOR SIZE: " + selector.length() + " SELECTOR: " + selector);
      >          MessageConsumer messageConsumer2 = session.createConsumer(topic, selector);