-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLOUD-3621 - Correct default bindings / jms-connection factory for usage with external broker #181
base: main
Are you sure you want to change the base?
Conversation
Note, this and #180 will need to be cherry picked to the 0.18.x branch. |
@luck3y , what happens with this change when we don't have remoting in the configuration? The embedded broker is enabled? This impacts 7.3 behavior. Embedded server was not started when provisioning Galleon layers (eg: cloud-server). |
@jfdenise there is an additional check for the presence of the remoting subsystem before adding the embedded server at messaging.sh#L1002, so it won't be configured. @luck3y I don't understand at all the motivation of this change, Jira title is "External broker configuration requires unnecessary remoting". When there is an external broker, The |
@yersan See here: wildfly-cekit-modules/jboss/container/wildfly/launch/messaging/added/launch/messaging.sh Line 949 in 7633804
If can_add_embedded() ends up setting DISABLE_EMBEDDED_JMS_BROKER=always then this line doesn't end up setting the default bindings, so the lookup fails when you deploy an app. |
Then I believe the fix should be there in L949. What do you think if we replace the complex if by: if [ "$REMOTE_AMQ_BROKER" = "true" ] && [ -n "${defaultJmsConnectionFactoryJndi}" ]; then
echo "/subsystem=ee/service=default-bindings:write-attribute(name=jms-connection-factory, value=\"${defaultJmsConnectionFactoryJndi}\")" >> "${CLI_SCRIPT_FILE}"
elif ([ -n "${MQ_QUEUES}" ] || [ -n "${HORNETQ_QUEUES}" ] || [ -n "${MQ_TOPICS}" ] || [ -n "${HORNETQ_TOPICS}" ] || [ "x${DISABLE_EMBEDDED_JMS_BROKER}" != "xtrue" ]) && [ "x${DISABLE_EMBEDDED_JMS_BROKER}" != "xalways" ] && [ -n "${defaultJmsConnectionFactoryJndi}" ]; then
echo "/subsystem=ee/service=default-bindings:write-attribute(name=jms-connection-factory, value=\"${defaultJmsConnectionFactoryJndi}\")" >> "${CLI_SCRIPT_FILE}"
else
echo "/subsystem=ee/service=default-bindings:undefine-attribute(name=jms-connection-factory)" >> "${CLI_SCRIPT_FILE}"
fi It also duplicate one line, but I think it gets more clear the intention. Would that work? |
@yersan That seems fine to me, so +1. Do you want me to make the change? |
Thanks @luck3y , yes, please, if you can, force-push the PR, I haven't executed the bats tests or test with a deployment though. Notice there is also a similar check when we are running on xml mode, see L936 |
@yeray this should be all set -- in the case of xml config, the if should short circuit if the remote broker is in use on L936, so it seems fine to me, plus the tests pass :) |
Hi @luck3y , I think L936 should be fixed as well, since the In L936, If remoting subsystem is not present but there is a remote broker, the default-bindings won't be configured because the logical operands will return false. |
@yersan Ah, yes, thanks. I think I'd just stared at it long enough to convince myself it was fine :) I'll add that here too. |
https://issues.redhat.com/browse/CLOUD-3621
Signed-off-by: Ken Wills [email protected]