Oracle Service Bus retrying service callout - osb

I am new to Oracle OSB and I am trying to invoke a service, but if the invocation fails, retry that invocation up to N times. If it fails N+1 times I want to log the occurence.
Can anyone help me or suggest me some documentation?
Cheers

I think you have created following services already in your osb console:
1. Proxy Service
2. Business Service
I think you want to try to call the Service N extra times, that will make the last try as (N+1)th try or Nth retry.
Now, for retry mechanism, set Retry Count in Transport Configuration of Business Service to N.
In case of failure of the Nth retry, you will receive an error back in your proxy service. Suppose you called Business Service from Route Node of Proxy Service. In this case, you can catch the error in RouteNode Error Handler. You can log the details here.

Related

Azure Logic Apps- Standard Stateful

I understand that Azure standard Stateful Logic app workflow runs Asynchronously but can i use stateful standard logic app for the below scenario:
We want to receive Json data from the third party in a HTTP post request, then process it and store it in Azure data lake. But the problem is since Azure standard stateful workflow runs asynchronously as soon the http trigger is hit it returns Status 202 Accepted. I want to send the caller end status of the request. For example- I want to send 500 Internal server error when the request was valid but still the workflow failed due to an internal error. If the data was processed successfully i want to send the caller HTTP Status 200 Ok. I dont want to send always HTTP status 202 Accepted to the caller. I want the caller to know what exactly happened to their HTTP request. Is it possible through standard logic app? I dont want to use consumption Logic app because of security reasons.
You can achieve this using runafter configuration by enabling this configuration it runs even after the whole workflow is getting failed.
Go to your work flow and select Menu for the action you want to run regardless if the previous one is about to fail, timeout, or skip. It's Condition in my case, and then 'Configure run after'.
For instance here is my logic app
Here is how my code view looks like :
OUTPUT:
UPDATED ANSWER
In that case, too you can use the same runafter concept with the condition having status code is not equal to 200 as a true statement and continue the flow
Here is the logic app
Here is the output

Logic app executed twice for the same message from servicebus queue with message state=Active and Scheduled

A message is being dropped to Service bus queue with ScheduledEnqueueTimeUTC and Service Bus Connector in Logic app has trigger set to pick messages from queue at 12:05AM EST EveryDay.
Problem: Logic app has picked the same message twice one with Service bus message properties State='Scheduled' and other with state='Active' with same sequenceNumber. May i know when this happens and how can this be solved.
Problem: Logic app has picked the same message twice one with Service
bus message properties State='Scheduled' and other with state='Active'
with same sequenceNumber. May i know when this happens and how can
this be solved.
Here we discovered one of the workarounds that will meet your needs. To pick and send a message only once, we must set our settings to split on as seen below.
NOTE: I tried using Logic app standard, as this option is not available in Consumption plan
Please refer this MS DOC & SO THREAD for more information .

How to develop locally with service worker?

Instead of generating a build every time I make a change, I want to use the service worker while developing. I've already managed to use the https protocol with a valid certificate, but the service worker doesn't install it. I imagine it is related to the following error "No matching service worker detected. You may need to reload the page, or check that the service worker for the current page also controls the start of the URL from the manifest."

Apache camel retry logic while polling from remote server

I am trying to pull files from a remote server and if not able to connect to remote server want to implement below scenarios:
Would like to retry 'N' times,
If the connection is not successful after retrying want to stop polling and throw an exception to consumer saying "Server is not responding"
In your route you need a bean that connects to the remote server. If it can't connect, it should through an exception.
Then add an onException handler in your route
onException(CannotConnectException.class)
.maximumRedeliveries(3)
.processRef("doSomething")
The "doSomething" process has to take care of stop polling and inform consumer part of the route. For example, to stop polling you could call a method of the connection bean to stop it polling. The best solution is really going to depend on how you rest of your system fits together.
I would use a polling strategy for this. So the commit and rollback methods will decide on what to do if there is an issue with the route of some sort

Recurringly calling a RIA service with Azure Scheduler

I currently have a WorkerRole doing that for me.
Basically, it keeps sleeping and wakes up every hour to call the service.
But with the recent release (in my country) of Azure Scheduler, I'm wondering if I can replace that non-free WorkerRole with a free Sheduler job.
So I tried creating a job with a PUT request like this one:
http://.azurewebsites.net/ClientBin/.svc/binary/
But I get the following error in the scheduler history:
502 - Web server received an invalid response while acting as a
gateway or proxy server.
Is it a URL problem?
Is it an authentication issue?
Is it even feasible?
Thanks!
I eventually used a WebJob to do my recurring task.

Resources