Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add callback or chan for failed pushes #386

Closed
evgeniybaranov opened this issue Dec 5, 2018 · 4 comments
Closed

Add callback or chan for failed pushes #386

evgeniybaranov opened this issue Dec 5, 2018 · 4 comments

Comments

@evgeniybaranov
Copy link

Hi,

Add the callback or chan with error and token for the failed push notification(apns and fcm).
For example when you make notification with multiple tokens and some tokens is "BadDeviceToken", I can't handle these requests. PushToIOS or PushToAndroid - return only bool value

@pennersr
Copy link

pennersr commented Apr 2, 2019

There is a sync mode available that should allow for getting error feedback, see: #109. Though, I do not fully comprehend the design choice of having to switch to synchronous mode in order to be able to obtain feedback. A few points:

  • Receiving and processing error feedback is not really optional. Purging outdated tokens is a requirement for a production ready system. For example, Apple documents: "By using this information [...] you reduce unnecessary message overhead and improve overall system performance. Query the feedback service daily[...]".

  • Given the previous bullet, any production ready system would have to be running in synchronous mode. But, from a push client architecture perspective blocking the client until the push request is fully processed is not desirable. To work around this, clients would have to introduce their own queueing mechanism to work around the risk of getting temporarily blocked.

All in all, a method of obtaining error feedback in asynchronous mode is required. It could be as simple as introducing a new error feedback endpoint that, when queried, returns the feedback collected since the previous call to the endpoint. This way, no complicated callback mechanism would be required.

Update: FWIW, to tackle this I rolled my own over at https://gitlab.com/pennersr/shove

@appleboy
Copy link
Owner

Maybe I can add the feature to support webhook that receive the notification log if fail.

@yacir
Copy link
Contributor

yacir commented Jun 3, 2019

Hi @appleboy i ve pushed a PR if you wana check it.

@appleboy
Copy link
Owner

appleboy commented Sep 6, 2019

closed via #414

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants