resend docusign event notification - docusignapi

What happens when the event notification is triggered from docusign and our server is down or due to network issue we didn't receive the notification. Will the docusign sends it again or we need to do the pooling.

Depending on your requiresAcknowledgement configuration of Connect
requiresAcknowledgement
When set to true, and a publication message fails to be acknowledged, the message goes back into the queue and the system will retry
delivery after a successful acknowledgement is received. If the
delivery fails a second time, the message is not returned to the queue
for sending until Connect receives a successful acknowledgement and it
has been at least 24 hours since the previous retry. There is a
maximum of ten retries Alternately, you can use Republish Connect
Information to manually republish the envelope information.
API Docs Source: https://docs.docusign.com/esign/restapi/Connect/ConnectConfigurations/get/

Related

What happens when a DocuSign envelope-level Connect event (created via the API) exhausts all retries?

If an envelope-level (vs account-level) Connect event created via the API with RequireAcknowledgement set to TRUE exhausts all retries, what happens?
In the support article, "Connect Failures and Retries", it mentions, "Administrators can choose to receive email notifications. You receive two proactive emails and another email at deactivation.". However, it seems like that applies to account-level Connect configurations, not envelope-level Connect events created through the API.
Basically, I'm trying to determine what happens after the 15-day mark, when all retries have been exhausted. Ideally, I'd receive an email notification.
After 15 days we will no longer auto-retry events and those specific events will need to be manually retried via the republish tool in the UI or with our new Republish API call.
Envelope-level Connect configurations are not being auto-disabled at this time so there will be no email notification.

DocuSign webhook never retried

I am using the official DocuSign java client 3.2.0. I have set the envelope level notification as listed below. Say the webhook URL is https://A.
EventNotification eventNotification = new EventNotification();
eventNotification.setIncludeHMAC("true");
eventNotification.setIncludeDocuments("true");
eventNotification.setRequireAcknowledgment("true");
eventNotification.setUrl("https://A");
EnvelopeEvent envelopeEvent = new EnvelopeEvent();
envelopeEvent.setEnvelopeEventStatusCode("completed");
eventNotification.setEnvelopeEvents(Arrays.asList(envelopeEvent));
envelopeDefinition.setEventNotification(eventNotification);
I am trying to test the retry logic for this webhook. After few successful push requests, I intentionally made the service to return non 200 code (Example 404) for one of the request. Then I reverted the logic, so that the service continue to return 200 response for new requests.
I checked after more than 24 hours, the failed request was never retried.
Is there any reason why the request was never retried eventhough there were successful requests after the failure?
I also have a connect listener configured to push the complete notification for all the envelopes to webhook URL https://B
Currently we have come issue with this webhook URL, so all the push notification to https://B is getting failed.
Is the continuous failure with the https://B connect webhook stop retries to envelope level notification webhook https://A ?
Also Is there any difference between the connect retry vs envelope notification retries?
For for global account events (all users and envelopes) make sure "Require Acknowledgement" option is selected in your Connect settings for the specific webhook for the failed to be re-pushed.
Connect webhook is global (all users and envelopes) for the account and you can select when is triggered for example "Envelope Sent", "Envelope Voided" etc. In this way you can have multiple webhooks handling different account events.
In your case you are setting webhook notification only for the specified envelope.
Also this could help you
https://developers.docusign.com/docs/esign-rest-api/reference/Connect/ConnectEvents/
Connect retries at the account level for Aggregate Messages (the default) after 24 hours after a subsequent message is sent. I will ask about envelope-level connect retries.
Better is to switch to Send Intermediate Messages (SIM) queuing. It retries faster.
Best is to have a 100% always up listener (server). An easy and cheap (free) technique for this is to use AWS PaaS to receive and enqueue the messages. See blog post and sample code. We also have sample code for Google Cloud and Azure.

Sample require for message 5a(once signing ceremony finished)

I think, once we send message 1a envelop to docusign. And after signing ceremony completed, next step to receive message 5a, this message our application receive. As per understanding, we got message and signed documents.
Can please provide sample message which we receive, so that we can design our API to support this.?
Please note - we are using rest API. so we prefer to have JSON based.
I think you're asking about the notification messages sent to clients via the DocuSign webhook system, Connect.
Here's an example notification message. A JSON message format is not yet available, it is planned for this Autumn.
Added
(Based on the OP's comment...)
There are two ways for your application to learn the status of an envelope:
Use a webhook. DocuSign will call your application when the envelope is complete. The DocuSign webhook system is called "Connect."
Poll DocuSign. You can poll DocuSign, asking about the status of an envelope no more frequently than once every 15 minutes.

Azure Topics - Multiple Listeners on Same Subscription

Is there a way to have multiple listening clients on one Azure Topic Subscription, and they all recieve ALL messages?
My understanding is that the only implementation of a Subscription is that the Published message is only delivered to ONE client on that subscription, as it is like a queue.
Can these messages be copied to multiple clients using the same Subscription?
EDIT: Potential use case example
A server notifies all of its clients (web clients via browser, or application), that are subscribed to the topic, of an object that has changed its value
More simply, multiple PCs are able to see a data value change
EDIT 2: My setup/what I'm looking for
The issue that I am running into is that a message is marked as consumed by one client, and not delivered to the other client. I have 3 PCs in a test environment:(1 PC publishing messages (we'll call this the Publisher) to the topic, and 2 other PCs subscribed to the topic using the same SubscriptionName (We'll call these Client 1 and Client 2)).
So we have this setup:
Publisher - Publishes to topic
Client 1 - Subscibed using SubscriptionName = Test1
Client 2 - Subscribed using SubscriptionName = Test1
The Publisher publishes 10 messages to the topic.
Client 1 gets Message 0
Client 2 gets Message 1
Client 1 gets Message 2
... And so on (Not all 10 messages are recieved by both Client 1 and Client 2)
I want the Clients to recieve ALL messages, like this:
Client 1 AND Client 2 get Message 0
Client 1 AND Client 2 get Message 1
Client 1 AND Client 2 get Message 2
... And so on.
Service Bus is a one-to-one or end-to-end messaging system.
What you need is Azure Event Hub or Event Grid.
It is not possible for both the client1 and client2 to get the same messsage.
To put it straight, when a message is received by client1 from a subscription and processed successfully, the message is removed from the subscription, so the client2 will not be able to receive the same message again.
Hope this clarifies.
Yes, its a one-to-one implementation, but, if you have real concern about message processing completing in sequential order then it depends on the Receive mode.
You can specify two different modes in which Service Bus receives messages.
Receive and delete.
In this mode, when Service Bus receives the request from the consumer, it marks the message as being consumed and returns it to the consumer application. This mode is the simplest model. It works best for scenarios in which the application can tolerate not processing a message if a failure occurs. To understand this scenario, consider a scenario in which the consumer issues the receive request and then crashes before processing it. As Service Bus marks the message as being consumed, the application begins consuming messages upon restart. It will miss the message that it consumed before the crash.
Peek lock.
In this mode, the receive operation becomes two-stage, which makes it possible to support applications that can't tolerate missing messages.
Finds the next message to be consumed, locks it to prevent other consumers from receiving it, and then, return the message to the application.
After the application finishes processing the message, it requests the Service Bus service to complete the second stage of the receive process. Then, the service marks the message as being consumed.
If the application is unable to process the message for some reason, it can request the Service Bus service to abandon the message. Service Bus unlocks the message and makes it available to be received again, either by the same consumer or by another competing consumer. Secondly, there's a timeout associated with the lock. If the application fails to process the message before the lock timeout expires, Service Bus unlocks the message and makes it available to be received again.
If the application crashes after it processes the message, but before it requests the Service Bus service to complete the message, Service Bus redelivers the message to the application when it restarts. This process is often called at-least once processing. That is, each message is processed at least once. However, in certain situations the same message may be redelivered. If your scenario can't tolerate duplicate processing, add additional logic in your application to detect duplicates. For more information, see Duplicate detection. This feature is known as exactly once processing.
Check this link for more details.

How can I control acknowledgement in Cloud PubSub using Node.js

Basically I have created a cloud function(written a Node.js code) which will trigger on the message of cloud pubsub topic and will load that data to Bigquery table.
A message in a topic gets deleted after reading it by cloud function. I understand that subscriber internally sends acknowledgement and result of that, message gets deleted from topic.
I want to control the acknowledgement sent to publisher. How can it be achieved, didn't find any document on this.
Google Cloud Functions does not allow you to control the acknowledgement of the Cloud Pub/Sub message. Upon completion of the function, the message is acknowledged for the subscription. If you want finer-grained control over acknowledgements, then you will need to use Google Cloud Pub/Sub directly. There is a Node.js client library.
Just some clarifying notes on acknowledgements: Acknowledging a message for a single subscription doesn't mean the message is deleted for the topic, only for the subscription. Other independent subscriptions will still receive the message and have to acknowledge it. This is also independent of the acknowledgement sent to the publisher. When a Google Cloud Pub/Sub message is published, the publish call is acknowledged (i.e., a response is sent to the publisher) once Google Cloud Pub/Sub has saved the message and guarantees it will be delivered to subscriptions. This is one of the main advantages of an asynchronous message delivery system: receiving the message from the publisher (and acknowledging the publish) is independent of delivering the message via a subscription (which is separately acknowledged by the subscriber).
If I understand correctly; you made a pub/sub topic and placed a cloud function within the same project as this topic. The cloud function is deployed with a google.pubsub.topic.publish trigger for the specified topic.
Since using a queue/topic, producer and consumer operate independently of each other. This enables a loosely coupled architecture, which has its own advantages and disadvantages.
If the publisher publishes a message to the topic, it gets confirmation that the message is sent to the topic successfully. Otherwise your code will give an exception (connection refused, forbidden, etc). For Node.js and other languages, there are pub/sub client sdk's which you can use to publish messages fairly easy.
When the message is on the topic, it will go to the subscribers, which can be push or pull subscriptions. At this point, acknowledgement is getting important. Google pub/sub, as do other queues/topics, are designed with guaranteed delivery. This means if a message could not be delivered, it will try again after some (configurable) time, until the total lifetime is exceeded (default is 7 days)
When using a pull subscription and want to let the topic know that you successfully received the message you would need something like this in Node.js:
message.ack();
When using a push subscription to an API or a HTTP cloud function, you would need to return a custom http code. Pub/sub expects a succes status code (e.g. 200 or 204):
res.status(204);
res.send('OK');
The only way I have found to reliably control what messages get acknowledged and don't in a cloud function is by using the REST Service APIs.
This is because the node.js pubsub client services acknowledgements and manages connections in the background. This is clearly forbidden in a cloud function.
However, the REST API's are fairly easy to use, and give fine grain control over what messages get acknowledged.

Resources