How to use an external OpenShift namespace in cdi-camel -


i trying use archetype cdi-camel-mq-archetype test out application running on openshift in own namespace. want application use message broker residing in different namespace on same openshift cluster. when running application on openshift see following error in pod's logs:

java.lang.runtimeexception: failed process @factory annotated method: create on bean: com.demo.mqdemotest.activemqcomponentfactory. failed lookup bean of type: class org.apache.activemq.activemqconnectionfactory service: broker-tcp.

caused by: java.lang.runtimeexception: failed process @factory annotated method: create on bean: com.demo.mqdemotest.mq.activemqconfigurer. failed lookup service broker-tcp.

caused by: java.lang.illegalargumentexception: no kubernetes service found name: broker-tcp in namespace: null

is there way inject namespace broker lives in application (as not see way in fabric8 cdi documentation)? if not how work expected?

you have 2 options. depending on setup:

in future through linking support able directly provide service 1 project another.

if have flat network in openshift installation , no namespace segregation, issue in case might how reference services between projects.

if in camel-mq project, can use services mq-demo project using url:

<service>.mq-demo.svc.cluster.local:<port> 

to services in mq-demo run:

oc svc -n mq-demo 

more on networking can found here: openshift origin: networking

next possibility - based on exception message broker-tcp in namespace: null. maybe should specify namespace in broker-tcp service exists.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -