Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-21747

ActivationConfigProperty "destination" not working for MDB in image eap73-openjdk8-openshift-rhel7

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 7.3.6.GA
    • JMS
    • False
    • False
    • Undefined
    • Hide

      New OpenShift project

      • oc new-project reproducer

      AMQ Broker - setup

      • create-ssh.sh
      • oc create secret generic amq-broker-ssl-secret --from-file=broker.ks=./ssh/server-keystore.jks --from-file=client.ts=./ssh/client-keystore.jks --from-literal=keyStorePassword=secret --from-literal=trustStorePassword=secret
      • oc apply -f operatorgroup.yaml
      • oc apply -f subscription.yaml
      • oc apply -f activemqartemis.yaml
      • oc apply -f in-queue-address.yaml
      • oc apply -f out-queue-address.yaml
      • oc apply -f test-queue-address.yaml

      EAP - setup

      • git clone git@github.com:tommaso-borgato/eap-amq-broker.git -b mdb-bug
      • cd eap-amq-broker && mvn package
      • oc secrets link builder <your secret to pull images from registry.redhat.io>
      • oc new-build --name=eap-jms registry.redhat.io/jboss-eap-7/eap73-openjdk8-openshift-rhel7:latest --binary=true
      • oc start-build eap-jms --from-file=target/ROOT.war --wait
      • oc new-app eap-jms
      • oc expose service/eap-jms
      • oc set env deployment/eap-jms DISABLE_EMBEDDED_JMS_BROKER=true
      • oc set volume deployment/eap-jms --add --name=amq-broker-ssl-secret -m /etc/secrets -t secret --secret-name=amq-broker-ssl-secret
      • extensions.sh
      • oc create configmap jboss-cli --from-file=postconfigure.sh=postconfigure.sh --from-file=extensions.cli=extensions.cli
      • oc set volume deployment/eap-jms --add --name=jboss-cli -m /opt/eap/extensions -t configmap --configmap-name=jboss-cli --default-mode='0755' --overwrite

      Reproduce

      • export EAP_ROUTE=$(oc get route eap-jms -o template --template '{{ .spec.host}}')
      • curl ${EAP_ROUTE}/jms-test?request=send-request-message-for-mdb: response is "Sent a text message with to ActiveMQQueue[inQueue]"
      • curl ${EAP_ROUTE}/jms-test?request=consume-reply-message-for-mdb: response is "null message details: null"

      Compare

      Using branch main in eap-amq-broker the behaviour is the correct one:

      • git checkout main
      • oc start-build eap-jms --from-file=target/ROOT.war --wait
      • curl ${EAP_ROUTE}/jms-test?request=send-request-message-for-mdb: response is "Sent a text message with to ActiveMQQueue[inQueue]"
      • curl ${EAP_ROUTE}/jms-test?request=consume-reply-message-for-mdb: response is like "Hello MDB - reply message! message details: ActiveMQMessage[ID:046cfa30-a75d-11eb-a940-0a580a8302fa]:PERSISTENT/ClientMessageImpl[messageID=2611, durable=true, address=outQueue,userID=046cfa30-a75d-11eb-a940-0a580a8302fa,properties=TypedProperties[inMessageId=ID:f851e0ed-a75b-11eb-b6ef-0a580a800572,__AMQ_CID=0465f54a-a75d-11eb-a940-0a580a8302fa,_AMQ_ROUTING_TYPE=1]]"
      Show
      New OpenShift project oc new-project reproducer AMQ Broker - setup create-ssh.sh oc create secret generic amq-broker-ssl-secret --from-file=broker.ks=./ssh/server-keystore.jks --from-file=client.ts=./ssh/client-keystore.jks --from-literal=keyStorePassword=secret --from-literal=trustStorePassword=secret oc apply -f operatorgroup.yaml oc apply -f subscription.yaml oc apply -f activemqartemis.yaml oc apply -f in-queue-address.yaml oc apply -f out-queue-address.yaml oc apply -f test-queue-address.yaml EAP - setup git clone git@github.com:tommaso-borgato/eap-amq-broker.git -b mdb-bug cd eap-amq-broker && mvn package oc secrets link builder <your secret to pull images from registry.redhat.io> oc new-build --name=eap-jms registry.redhat.io/jboss-eap-7/eap73-openjdk8-openshift-rhel7:latest --binary=true oc start-build eap-jms --from-file=target/ROOT.war --wait oc new-app eap-jms oc expose service/eap-jms oc set env deployment/eap-jms DISABLE_EMBEDDED_JMS_BROKER=true oc set volume deployment/eap-jms --add --name=amq-broker-ssl-secret -m /etc/secrets -t secret --secret-name=amq-broker-ssl-secret extensions.sh oc create configmap jboss-cli --from-file=postconfigure.sh=postconfigure.sh --from-file=extensions.cli=extensions.cli oc set volume deployment/eap-jms --add --name=jboss-cli -m /opt/eap/extensions -t configmap --configmap-name=jboss-cli --default-mode='0755' --overwrite Reproduce export EAP_ROUTE=$(oc get route eap-jms -o template --template '{{ .spec.host}}') curl ${EAP_ROUTE}/jms-test?request=send-request-message-for-mdb : response is "Sent a text message with to ActiveMQQueue [inQueue] " curl ${EAP_ROUTE}/jms-test?request=consume-reply-message-for-mdb : response is "null message details: null" Compare Using branch main in eap-amq-broker the behaviour is the correct one: git checkout main oc start-build eap-jms --from-file=target/ROOT.war --wait curl ${EAP_ROUTE}/jms-test?request=send-request-message-for-mdb : response is "Sent a text message with to ActiveMQQueue [inQueue] " curl ${EAP_ROUTE}/jms-test?request=consume-reply-message-for-mdb : response is like "Hello MDB - reply message! message details: ActiveMQMessage [ID:046cfa30-a75d-11eb-a940-0a580a8302fa] :PERSISTENT/ClientMessageImpl[messageID=2611, durable=true, address=outQueue,userID=046cfa30-a75d-11eb-a940-0a580a8302fa,properties=TypedProperties [inMessageId=ID:f851e0ed-a75b-11eb-b6ef-0a580a800572,__AMQ_CID=0465f54a-a75d-11eb-a940-0a580a8302fa,_AMQ_ROUTING_TYPE=1] ]"

    Description

      We spotted an issue with Message Driven Beans when running inside image registry.redhat.io/jboss-eap-7/eap73-openjdk8-openshift-rhel7;

      Basically it looks like that the following settings on the MDB do not work any more and the MDB doesn't receive messages from the configured queue:

      @ActivationConfigProperty(propertyName = "destination", propertyValue = "inQueue"),
      		@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
      		@ActivationConfigProperty(propertyName = "connectionFactoryLookup", propertyValue = "java:jboss/RemoteJmsXA"),
      		@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge")
      

      A workaround exists and consists in replacing the EAP specific property "destination" wit h the standard property "destinationLookup":

      @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "java:/jms/amq/queue/inQueue"),
      		@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
      		@ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
      		@ActivationConfigProperty(propertyName = "connectionFactoryLookup", propertyValue = "java:jboss/RemoteJmsXA")
      

      Please note we could not reproduce the issue locally (i.e. outside OpenShift) using the zip distribution jboss-eap-7.3.6.zip; this suggests the issue is related to the eap73-openjdk8-openshift-rhel7 image.

      Please also note that the application used to reproduce the issue is an adapted version of the EAP quick-start helloworld-mdb.

      Attachments

        1. test-queue-address.yaml
          0.2 kB
        2. subscription.yaml
          0.3 kB
        3. README.md
          2 kB
        4. postconfigure.sh
          0.1 kB
        5. out-queue-address.yaml
          0.2 kB
        6. operatorgroup.yaml
          0.2 kB
        7. in-queue-address.yaml
          0.2 kB
        8. extensions.sh
          3 kB
        9. create-ssh.sh
          1 kB
        10. buildconfig.yaml
          2 kB
        11. amq-broker-ssl-secret.yaml
          13 kB
        12. activemqartemis.yaml
          1.0 kB

        Activity

          People

            tborgato@redhat.com Tommaso Borgato
            tborgato@redhat.com Tommaso Borgato
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: