I've never done it myself... but I would start by looking at the Service Bus REST run-time APIs...
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...
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.
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...
The table below compares the runtime features that are exposed via REST with the .NET APIs.
Feature HTTP .NET Send to queue/topic X X Receive from queue/subscription X X Support for partitioned entities X X Support for express entities X X Scheduled messages X X Batching send only X Session Receivers X Deadlettering X Message deferral X
I was looking at the below documentation.Had a thought,is this works for JMS adapter in SOA?
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.
8.3.6 Connecting with Third-Party Service Providers
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
Save and update the JMS adapter in deployments.
When i test this ,getting below 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
Unable to instantiate connection factory. JMS adapter was unable to look up the
connection factory amqps://testpolicy:a0wmRklbCGFCYo4nl8Y0oKSC3gViij9gagtZV9Bg+v
Uemail@example.com neither through JNDI nor instantiat
e it as a Java class
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.
1 person found this helpful
The way I understood the documentation, you should be configuring as...
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?
1 person found this helpful
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)
queue.QUEUE = queue1
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.
<[composite_name: RecevmsgQue] [composite_version: 1.0] [endpoint_name: JMS_
In] JmsAdapterMessage_getPayloadAsInputStream: Received null or unknown payload
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 !!