-
Notifications
You must be signed in to change notification settings - Fork 20
fixing channel hang issues with large outbox tables #31
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
Conversation
…to prevent streadway/amqp to deadlock
…cords from outbox
…fails When the extraction fails it prints out an error however this is due to the fact that the passed in message deaders do not contain the needed opentrace headers for extraction to work. This is expected as message producers do not necessarily pass in these headers so log level changed from error to debug in order not to litter the log
| outbox.log().WithError(err).WithField("delivery_tag", ack).Error("failed to update delivery tag") | ||
| } | ||
| case nack := <-outbox.nack: | ||
| outbox.log().WithField("deliver_tag", nack).Info("nack received for delivery tag") |
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.
You don't do Nack anymore?
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.
These nacks are the broker sending a negative confirm for the publication so we do not handle them and let the transactional outbox re publish the message the next time it scans for messages that were sent but not yet confirmed (that is done with the scavenging channel/goroutine)
| insert_date timestamp DEFAULT CURRENT_TIMESTAMP, | ||
| PRIMARY KEY(rec_id))` | ||
| PRIMARY KEY(rec_id), | ||
| INDEX status_delivery (rec_id, status, delivery_attempts))` |
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.
If you change the order of the index to
| INDEX status_delivery (rec_id, status, delivery_attempts))` | |
| INDEX status_delivery (status, delivery_attempts, rec_id))` |
you would not need to git the USE INDEX (status_delivery) hint in the query.
No description provided.