-
Notifications
You must be signed in to change notification settings - Fork 2
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
Unexpected message type handling #23
base: kombu-master
Are you sure you want to change the base?
Conversation
kombu/transport/pubsub.py
Outdated
@@ -212,10 +221,22 @@ def _msg_get(self, subscription_path): | |||
for msg in resp.received_messages: | |||
if self.temp_cache[subscription_path].full(): | |||
break | |||
data = loads(msg.message.data) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this can still fail in case data is not stringified json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeechu yes, it will .. i thought of it but expected that message which will be published will be a stringified json. Will update it if that's not the case .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please update since we want to avoid the process halting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes done
kombu/transport/pubsub.py
Outdated
"Pulled message of unexpected type: ", | ||
str(type(data)), " data: ", data])) | ||
# Ack it | ||
self.subscriber.\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
was this the approach discussed? to ack unexpected message?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeechu what do you plan to do with the message instead ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mpsmks @avinashdunzo any suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for go services, we have not acked any random message, lets do that here too
lets add a log and not ack it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes done
No description provided.