Event notifications are primarily used for one-way, event-based data streams where systems SEND
or RECEIVE
data asynchronously. You can think of these like CRUD type of requests you want to send to or receive from your connection's EHR system.
We use recoverable messages to ensure delivery of asynchronous traffic. We save these messages into highly durable queues so that they can survive restarts or other failures. We don't respond with a 200 OK
status unless we successfully saved the message in a highly durable queue first.
Read about our business continuity and disaster recovery plan.
Event notifications are delivered via Redox to the desired system using a first-in, first-out (FIFO) method. We work to maintain the order of asynchronous events in the order they are triggered.
One caveat to that, though, is that sometimes events are processed in parallel prior to being sent in FIFO order. Because of this, the message ID and transmission ID shouldn’t be used to sequence requests sent to a particular endpoint, especially when they rely on different data models or FHIR® resources. Instead, you should use the timestamp for when the data arrived at the endpoint to sequence it against other asynchronous traffic.
If failures happen during processing, we pause the queue for the intended endpoint so that we can maintain FIFO delivery after the issue is resolved.
Meanwhile, we send a notification to the sender or receiver, depending on where the failure occurred. Either way, the notification goes to the Alert Email, which is listed in the Organization Profile of the Redox dashboard.
Some packages don’t get to their intended destination. Amazon knows this well.
Sometimes your asynchronous messages also don’t get to their intended endpoint(s). The good news is that we can let you know whether your message arrived safely. But remember that asynchronous messages are one-way, so you won’t get a response back from your connection's system (much like Amazon doesn’t get thank-you packages for successfully delivered orders).
Any responses to asynchronous traffic are from Redox specifically about your outgoing message. And if your message went to multiple endpoints, you receive only one overall response. Check out the details about each scenario below.
If Redox successfully accepts your message, you receive a 200 OK
status with an empty Meta.Errors[]
array (for the Redox Data Model API) or issue[]
array (for the Redox FHIR® API) in the body of the response.
This does not mean that the message was successfully delivered to the intended endpoint. It only means that we received the message, saved it to a highly durable queue, and are ready to process it before delivering to the intended endpoint(s).
Later, if you want to know for certain whether your message was successfully processed and delivered, you can check the status of the related log. Learn more about logs.
An important distinction between responses and logs is that Redox sends one response to a message for multiple endpoints but creates a log for each endpoint. So if you send one message to 10 endpoints, you receive one response with 10 log objects and IDs in Meta.Logs[].ID
array (for the Data Model API).
On occasion, Redox can’t process a request because of an issue with the request or within Redox itself. If this happens, you receive a 4XX
or 5XX
HTTP status code and a response with the an array in the body populated: Meta.Errors[]
array (for the Data Model API) or the issue[]
array (for the FHIR® API). These arrays contain an error object with the type of failure and corresponding details. At a minimum, a Text
field provides the error message details.
{"Meta": {…"Errors": [{"Text": "Required field missing - Device.ID in Device:New"…}]}…}
{"resourceType": "OperationOutcome","issue": [{"severity": "error","code": "invalid","details": {"text": "Unknown search parameter name \"foobar\" for model \"Patient\"","coding": [{"code": "MSG_PARAM_UNKNOWN","system": "http://terminology.hl7.org/CodeSystem/operation-outcome","display": "Parameter \"foobar\" not understood"}]},"diagnostics": "Failed to execute FHIR search"}]}
As for the HTTP status codes, you may see any of these:
Code | Description |
---|---|
400 Bad Request | The request is formatted incorrectly or is missing required information. |
401 Unauthorized | Authentication failed. This means you need to refresh or regenerate your access token and try again. |
403 Forbidden or 404 Not Found | The request is missing the (a) POST verb; (b) designated endpoint; or (c) specified data model/resource after api.redoxengine.com (or api.ca.redoxengine.com for Canada). |
413 Payload Too Large | The payload sent exceeds the payload size limit of 10 MB. |
429 Too Many Requests | Your system has exceeded the rate limit of 7,500 requests per IP address for the current five-minute rolling window. Wait a few minutes then try initiating the request again. |
500 Internal Server Error | An unknown error occurred within Redox. |
502 Bad Gateway | The request was dropped within Redox. This can sometimes occur during brief periods when internal updates are being applied. |
504 Gateway Timeout | The request took too long to complete. Requests to Redox time out after a couple of minutes. |
We recommend that your system have queuing capability for your outgoing requests to Redox in case of any kind of failure. This way, your system can queue any subsequent outgoing requests until the issue is resolved.
For any of the 5XX
errors, you can retry sending the request to see if the Redox issue is resolved. We recommend using an exponential backoff strategy between retries. If the error still persists though, submit a ticket via our Help Desk.
When you receive a data payload from your connection's system, we rely on you to let us know whether your system received it successfully with the relevant HTTP status code. We wait for your response before deciding what to do next.
If you successfully receive an event from Redox, your system should send back a 200 OK
status with an empty Meta.Errors[]
array (for the Redox Data Model API) or issue[]
array (for the FHIR® API) in the body of the response. This response means that your system has processed the most recent data and is ready for the next payload. We proceed with sending your next asynchronous data payload.
If unable to receive an event, your system should send back to Redox the relevant 4XX
or 5XX
HTTP status code and a response with the relevant array in the body populated: Meta.Errors[]
array (for the Redox Data Model API) or the issue[]
array (for the Redox FHIR® API). This array should contain an error object with the type of failure and corresponding details. At a minimum, a Text
field should provide the error message details.
The failed response comes to us, but we don't pass it back to your connection's system. Your connection won't know that your system failed to receive their event notification.
It's possible to set up custom notifications if you're on our Premium plan. Talk to a Redoxer if you want to know more.
If you send a failed HTTP status code in response to an asynchronous message, our next action depends on the type of environment your endpoint is in.
For a production environment, we briefly retry sending the message after a brief pause then pause the queue.
For a staging or development environment, we retry sending the message after a brief pause, but we don’t pause the queue of asynchronous messages from your connection's system.
For non-critical errors, we expect that you send back a 200 OK
status prior to performing data validation or after finding an error that can be resolved at a later time. This way, we don’t pause your data for production environments and your development/staging environments can proceed with business as usual. This option ensures continuity in your data delivery so that your data flow doesn’t get hung up on a single troublesome data payload.
If you do identify a non-critical issue with an incoming request, we recommend that you log an error in your system and submit a ticket via our Help Desk if you need help resolving it.
Alternatively, if you're experiencing downtime or another critical error, we recommend that you send a 4XX
or 5XX
status to initiate pausing on our end so that none of your data is lost while you work to resolve your system.
The process for automatic retries occurs differently based on the environment type.
If an asynchronous message fails in a production environment, we retry the failed message until it succeeds. We also pause the queue for subsequent messages, so traffic is paused until the failed one successfully goes through. Our Integration team receives notifications if any message queues pile up so they can review and resolve any processing failures.
We ignore delivery failures for test requests. This means we don’t automatically retry or pause the queue when test requests fail sending to a production environment.
But let’s explain how we retry your failed request with that analogy of a mail carrier delivering a physical package:
The mail carrier rings the doorbell the first time, but no one answers. They wait a few seconds, then try ringing the doorbell again. There’s still no answer, but this is a determined—but polite—mail carrier. They wait a little longer before retrying a third time. Even then, the mail carrier doesn’t give up. They keep ringing the doorbell, but they wait a little bit longer between each try, so as to not be obnoxious while being persistent. Finally, the door opens, the receiver accepts the package, and the mail carrier continues on to deliver the next package.
In Redox terms, we follow the same pattern: waiting a few seconds before retrying, then steadily increasing the wait period until it becomes a fixed wait of a minute or two between requests. Retries continue every couple of minutes until the receiving endpoint acknowledges they received the data, or until we manually pause the request.
Retries may stop unexpectedly if we receive a different error code from the recipient system that initiated the request. We review these types of alerts daily to see if we need to manually intervene. If so, we reach out to the recipient's team to resolve issues.
We're all about that "never surrender" life, but we do let you know if we're having trouble delivering a request after our third failed attempt. We notify you via the email address listed in your alert email, which is in the Organization Profile page of the dashboard. Make sure that email address is up-to-date so that we can let you know when there's trouble in paradise—and when we've found paradise again by successfully delivering the request.
If you would like, we can set up more custom notifications for you, whether via email or Slack. For example, you can receive notifications for each endpoint that fails to accept one of your requests. Submit a ticket via our Help Desk to talk about your notification options.
If an asynchronous message fails in a development or staging environment, we don't automatically retry the failed message or pause the queue. This means that other asynchronous messages can continue sending.
We ignore delivery failures for test requests. This means we don’t automatically retry when test requests fail sending to a development or staging environment.
You can manually retry sending a message by navigating to the related log. You can perform a manual retry on any request, whether it be a test request that didn’t deliver, a request that Redox failed to process, or even a successful request that you want to send again. Learn how to initiate a manual retry.