2 Replies Latest reply on Aug 17, 2015 11:31 AM by pfyod

    Weirdness with messaging/clustering configuration

    pfyod

      Hello guys,

       

      We ran into some kind of trouble configuring messaging on WildFly 8.2 (in domain mode). Somehow deployment does not take proper configuration (clustered=true, proper cluster password) and reverts to some default. Weird part that no configuration file (domain.xml on domain controller, host.xml on host controller) has the values of clustered=false and cluster-password="CHANGE ME!!!"

      Here's output of CLI to give you an idea:

       

      [domain@AAA:9990 /] /profile=Test/subsystem=messaging/hornetq-server=default:read-attribute(name=clustered)
      {
        "outcome" => "success",
        "result" => true
      }
      [domain@AAA:9990 /] /host=BBB/server=CCC-test/subsystem=messaging/hornetq-server=default:read-attribute(name=clustered)
      {
        "outcome" => "success",
        "result" => true
      }
      [domain@AAA:9990 /] /host=BBB/server=CCC-test/deployment=DDD.war/subsystem=messaging/hornetq-server=default:read-attribute(name=clustered)
      {
        "outcome" => "success",
        "result" => false
      }
      
      

       

      Is there any way to debug it to see where exactly are configuration values coming from?

        • 1. Re: Weirdness with messaging/clustering configuration
          rhusar

          Weird part that no configuration file (domain.xml on domain controller, host.xml on host controller) has the values of clustered=false and cluster-password="CHANGE ME!!!"

          In general, defaults are coming from the resource definitions, e.g.:

          wildfly/BridgeDefinition.java at master · wildfly/wildfly · GitHub

           

          Someone from messaging can surely explain how to configure that per deployments..

          • 2. Re: Weirdness with messaging/clustering configuration
            pfyod

            My problem is not that I want to configure it per deployment. For some reason it just does not take messaging configuration from the profile (and reverts to defaults).

             

            Perhaps it's the way I define JMS destination that is wrong and I should reference container defined?

             

            Here's the relevant code:

             

            // define JMS destination
            @JMSDestinationDefinition(
                    name = "java:/jms/topic/monitoring",
                    interfaceName = "javax.jms.Topic",
                    destinationName = "monitoring"
            )
            // use it
            @MessageDriven(activationConfig = {
                    @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "jms/topic/monitoring"),
                    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
                    @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")})
            public class JMSEventReceiver implements MessageListener {
            ...
            }
            
            

             

            and

             

            public class JMSEventSender {
                @Resource(lookup = "java:/jms/topic/monitoring")
                private Topic cdiEventsTopic;
            
                @Inject
                private JMSContext jmsContext;
            
                @Transactional(Transactional.TxType.REQUIRES_NEW)
                public void send(@Observes @MonitoringReport Serializable outbound) {
                    jmsContext.createProducer().send(cdiEventsTopic, jmsContext.createObjectMessage(outbound));
                }
            }