0 Replies Latest reply on Sep 27, 2013 12:27 PM by michel.strogoff

    Message selector

    michel.strogoff

      Hi,

       

      I'm am preparing a secondary HornetQ server (embedded in AS7) which acts as a consumer of queues deployed on a primary server.

       

      Some of the messages should only be consumed by the primary server and hence I was thinking about message selectors to implement the solution.

       

      A property would be checked in the MDB deployment descriptor like

       

      ...
                      <activation-config-property>     
                          <activation-config-property-name>messageSelector</activation-config-property-name>
                          <activation-config-property-value>targetHost = '${env.HOSTNAME}'</activation-config-property-value>
                      </activation-config-property>
      ...
      

       

      And the producer would set the targetHost property value.

       

      If on the consumer server the HOSTNAME environment property is matching, the message would be consumed.

       

      My concern is to deploy the same binaries and deployment descriptor on the server nodes and to use environment variables to change the behavior of the consumers.

       

      Is it possible to set dynamic values (such as environment variables) as selector criteria ?

       

      Thanks for your help,

      Eric