-
Notifications
You must be signed in to change notification settings - Fork 437
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
[gps] Consuming message from external publisher in non-standard format #1117
Comments
I guess, the solution would be to make an attempt to parse message body and see weather it has If not, we can fallback and treat the body as body with empty properties and headers. |
Ah, ok, thank you. Was hoping that it might be somehow doable with the current version. I'll look into necessary modifications. |
Ok, here's a first draft. I'm testing it now with my app, and setting up repo env to run tests etc, but so far it seems to work ok. Thoughts? |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi @makasim - is there anything preventing you from merging this? |
It looks good. Last thing is CI complaing about code style https://travis-ci.org/github/php-enqueue/enqueue-dev/jobs/748125221 |
Yes, I've seen it, and I've chosen to ignore it - as it complains about the section which I haven't changed, and also, running the tests locally doesn't raise this issue at all. I guess we shouldn't really care about it here then? |
I understand that the CS issue is irrelevant to your change. Some times it happens. Could you please make CI happy ? I am okay to merge PR once CI green |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Sorry, got distracted with work (can you imagine!), and completely forgotten about this (thanks stale bot for the reminder!) Just rebased and repushed, all is nice and green now, into your hands then @makasim ! |
Thanks, merged. |
I have a Symfony app with
messenger
usingenqueue/gps
to send/consume Pub/Sub messages. Everything works fine as long as messages are published and consumed by my app - they are in the format expected byGpsMessage
, withbody
,properties
andheaders
at the top level.But now I need to also consume messages sent by an external publisher, which do not adhere to this format - talking specifically about messages sent by Gmail API Push Notifications, which look like this:
{"emailAddress": "[email protected]", "historyId": "9876543210"}
(https://developers.google.com/gmail/api/guides/push#receiving_notifications) - nobody
, noproperties
and noheaders
.Trying to consume a message like this,
GpsMessage
gives me an errorNotice: Undefined index: body
, and fails.Would appreciate any advice how can I make this work?
The text was updated successfully, but these errors were encountered: