For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
Hi Ram,
I've never done it myself... but I would start by looking at the Service Bus REST run-time APIs...
https://docs.microsoft.com/en-us/rest/api/servicebus/service-bus-runtime-rest
publish => Send Message Batch
consume => Receive and Delete Message (Destructive Read)
This is an interesting topic, please let me know how you go with the solution for this and I can try and help you along the way...
Cheers,
Vlad
Hi Vlad,
The Azure Service bus queues are exposed to REST api.
I ran a sample REST call test with SOAP ui,it works fine.
POST-->send messages to queue.
Authorization token needs to send as header.
Delete-->receive and delete messages from queue.
Authorization token needs to be added as header.
https://docs.microsoft.com/en-us/rest/api/servicebus/queues
How we can design our SOA process.
1)In case of POST call,we can publish messages to queue via REST.
2)In case of DELETE call,How we can consume messages as soon as the messages available in the queue via REST.(like the consume feature of queue)
Scheduling of REST composite?
Yep, sounds about right... I was looking into the documentation and noticed that Session Receivers are not available to the REST API, so yeah, I guess you will have to poll for messages at a regular intervals via scheduler...
https://docs.microsoft.com/en-us/rest/api/servicebus/introduction
The table below compares the runtime features that are exposed via REST with the .NET APIs.
I was looking at the below documentation.Had a thought,is this works for JMS adapter in SOA?
https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-jms-api-amqp#downloading-the-am…
Yep, it is very likely it is going to work... probably there will be some limitations, but mostly it seems to behave like a regular JMS provider...
At the very minimum you will have to put the jars into weblogic classpath, and then follow the steps to connect JMS adapter to a third-party service provider.
https://docs.oracle.com/middleware/12213/adapters/develop-soa-adapters/overview4.htm#TKADP9142
JMS Adapter can communicate with TIBCO,IBM MQ Series, and other certified third- party Service Providers. If these service providers are stopped and subsequently restarted, the JMS Adapter can successfully connect to them and process any pending messages.
Yes,i have downloaded the .jars from the http://people.apache.org/~rgodfrey/qpid-java-amqp-1-0-client-jms.html
placed into the location D:\SOA12c\NeworacleHome\user_projects\domains\SOA12c_domain\lib
Restarted the weblogic and SOA servers.
In weblogic console,Deployments-->JMS adapter-->Configuration_->Outbound Connection pools
Created JNDI --.eis/JMS/Azureque
Connection Properties:
1)ConnectionFactoryLocation:amqps://testpolicy:a0wmRklbCGFCYo4nl8Y0oKSC3gViij9gagtZV9Bg+vU=@servicebussoatst.servicebus.windows.net
2)FactoryProperties:
java.naming.factory.initial=org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory;java.naming.provider.url=amqps://testpolicy:a0wmRklbCGFCYo4nl8Y0oKSC3gViij9gagtZV9Bg+vU=@servicebussoatst.servicebus.windows.net;ThirdPartyJMSProvider=true
Save and update the JMS adapter in deployments.
When i test this ,getting below error.
Error:-
SendmsgQue:JMS_out [ Produce_Message_ptt::Produce_Message(opaque) ] : The JCA Bi
nding Component was unable to establish an outbound JCA CCI connection due to th
e following issue: BINDING.JCA-12141
ERRJMS_CONN_FAC_NOT_FOUND.
Unable to instantiate connection factory. JMS adapter was unable to look up the
connection factory amqps://testpolicy:a0wmRklbCGFCYo4nl8Y0oKSC3gViij9gagtZV9Bg+v
U=@servicebussoatst.servicebus.windows.net neither through JNDI nor instantiat
e it as a Java class
Hi,
Just copy the files to the lib folder won't be enough... I believe you have to add them to the CLASSPATH by editing the startup scripts - setDomainEnv.sh...
Yes,Now i have added the .jar files to the class path and restarted the servers.but still same error.Not sure what cause the issue.
The way I understood the documentation, you should be configuring as...
java.naming.factory.initial=org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory
java.naming.provider.url=servicebus.properties
ConnectionFactoryLocation=SBCF
And, you will need to create the "servicebus.properties" files and add it to the CLASSPATH as well... queue1 is the queue in Azure, QUEUE is the name JMS Adapter is going to see...
# servicebus.properties - sample JNDI configuration
# Register a ConnectionFactory in JNDI using the form:
# connectionfactory.[jndi_name] = [ConnectionURL]
connectionfactory.SBCF = amqps://[SASPolicyName]:[SASPolicyKey]@[namespace].servicebus.windows.net
# Register some queues in JNDI using the form
# queue.[jndi_name] = [physical_name]
# topic.[jndi_name] = [physical_name]
queue.QUEUE = queue1
Ok,got it.I tried this previously,I had created the servicebus.properties file and added to class path but i was giving connection factory.[jndi_name] as the connection factory which we created in SOAJMS module and queue.[jndi_name] as the queue created in SOAJMS module.Now i understand that these values are just defined in servicebus.properties file with any given name(no need to create in SOAJMS module) and refer them into connection pool configuration.
Please correct me,In the composite creation we need select third party adapter and give the Azure queue name while configuration of JMS Adapter?
Select third party adapter - yes, correct
give the Azure queue name while configuring JMS Adapter - no, not the azure queue name, my understanding is JMS Adapter will see the name that is configured as jndi_name in servicebus.properties, in the example the Azure queue name is "queue1", you are going to configure JMS Adapter as "QUEUE" (this is the jndi_name)
Please let me know if that works...
It's working now.I am able to send the messages to azure service bus queues.
In case of receive messages(consume),i am getting below error.I hope Service bus queues handle default JSON payload.
error:-
<[composite_name: RecevmsgQue] [composite_version: 1.0] [endpoint_name: JMS_
In] JmsAdapterMessage_getPayloadAsInputStream: Received null or unknown payload
type (null)>
Hi vlad,
I have fixed the payload issue now,after selecting message type as Bytes message.
looks we receive the payload in the form of Base64 encode.We need to decode that, to see the original message.
Any way,I would say we successfully integrated the Azure service bus queues with Oracle SOA12c JMS queues.
Thanks for quick help !!